]> 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:08:37 +0000 (16:08 -0500)
commitf84c75b26d13065e90104609a6e7e193392c123a
treeade796ad53dbdf0a730b0129dca1ad60a16d31bc
parent066232c2fcda409c43aa9d4a2230fc9cb73f6af5
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