]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1513554 - Prevent deletion of reserved rows.
authorChris Sharp <csharp@georgialibraries.org>
Thu, 5 Nov 2015 18:30:51 +0000 (13:30 -0500)
committerJason Stephenson <jstephenson@mvlc.org>
Fri, 13 Nov 2015 21:16:57 +0000 (16:16 -0500)
commit32838d5faef842d22b715c8768695745cb31e015
tree50fe5abfd46443808201350e46d4492ce653821b
parentec852021bad593cd100b5a2d7cc53afc4dbc4b66
LP#1513554 - Prevent deletion of reserved rows.

It was previously possible to delete reserved rows in
the acq.cancel_reasons table via the UI.  We take a belt
and suspenders approach here:

1) Grey out the checkboxes beside cancel reasons with an
   ID lower than 2000.
2) Create a trigger on the acq.cancel_reason table that
   prevents deletion of rows with an ID lower than 2000.

The trigger executes a new generally available function
for use in similar situations in the future.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/sql/Pg/000.functions.general.sql
Open-ILS/src/sql/Pg/200.schema.acq.sql
Open-ILS/src/sql/Pg/t/lp1513554_do_not_delete_reserved_cancel_reasons.pg [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.no_delete_acq_cancel_reasons.sql [new file with mode: 0644]
Open-ILS/web/js/ui/default/conify/global/acq/cancel_reason.js