As an alternative fix to this issue, how about we disable the ok button when adding an item alert if the alert is blank or the alert type isn't specified?
On the server side, logs like the following can let you know how often this happens. The DB insert fails with a null alert_type, but it is silent failure to the user.
27/pg.10.log.gz:2021-08-27 10:03:36 egdb1 postgres[26894]: [3-1] 2021-08-27 10:03:36 CDT [26894-1] evergreen@egdbprod ERROR: null value in column "alert_type" violates not-null constraint
27/pg.10.log.gz:2021-08-27 10:03:36 egdb1 postgres[26894]: [3-2] 2021-08-27 10:03:36 CDT [26894-2] evergreen@egdbprod DETAIL: Failing row contains (82548, null, 3489644, f, 2021-08-27 10:03:36.951408-05, 112773, Cover bent in book drop, null, null).
As an alternative fix to this issue, how about we disable the ok button when adding an item alert if the alert is blank or the alert type isn't specified?
<input type="submit" class="btn btn-primary" value="[% l('OK') %]{{ copy_alert. alert_type }}"
ng- disabled= "copy_alert. note == '' || copy_alert. alert_type === undefined" />
in t_add_copy_ alert_dialog. tt2.
On the server side, logs like the following can let you know how often this happens. The DB insert fails with a null alert_type, but it is silent failure to the user.
27/pg.10. log.gz: 2021-08- 27 10:03:36 egdb1 postgres[26894]: [3-1] 2021-08-27 10:03:36 CDT [26894-1] evergreen@egdbprod ERROR: null value in column "alert_type" violates not-null constraint log.gz: 2021-08- 27 10:03:36 egdb1 postgres[26894]: [3-2] 2021-08-27 10:03:36 CDT [26894-2] evergreen@egdbprod DETAIL: Failing row contains (82548, null, 3489644, f, 2021-08-27 10:03:36.951408-05, 112773, Cover bent in book drop, null, null).
27/pg.10.