asset.hold_request sms_check constraint can be usurped by orphaned sms_carrier data

Bug #1830953 reported by Cesar V
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
New
Wishlist
Unassigned

Bug Description

Hold requests in asset.hold_request have a constraint called "sms_check" that makes sure that all records that have a sms_notify value also have a sms_carrier (id) value, as both these fields are needed in order for an SMS notification be sent successfully.

However, I have encountered that existing holds can be updated such that sms_notify is cleared/blanked but the sms_carrier (ID) remains, leaving the hold(s) with an orphan carrier id, that can later usurp the sms_check validation during subsequent updates.

For example, a user may update a hold's sms_notify phone number that has an orphan sms_carrier value, but forgets to set the proper carrier, thus later causing failure to notify.

I propose we discuss the possibility of a database BEFORE trigger being added, so that we may prevent rows with "orphan" sms_carrier fields.

tags: added: needsdiscussion
Changed in evergreen:
importance: Undecided → Wishlist
tags: added: performance
tags: added: actiontrigger
removed: needsdiscussion wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.