acq.purchase_order 'state' field should have a check constraint

Bug #893193 reported by Ben Ostrowsky
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Status tracked in Main
2.0
Won't Fix
Low
Bill Erickson
2.1
Fix Released
Low
Bill Erickson
2.2
Fix Released
Low
Bill Erickson
Main
Fix Released
Low
Bill Erickson

Bug Description

It's possible to UPDATE acq.purchase_order SET state = 'Massachusetts' without the database complaining. In order to prevent this, the 'state' field should be defined as TEXT NOT NULL DEFAULT 'new'::TEXT CHECK (state IN ('new','pending','on-order','received','cancelled'))

Revision history for this message
Bill Erickson (berick) wrote :
Revision history for this message
Bill Erickson (berick) wrote :

Branch for 2.1 and 2.0. For 2.0, be sure to only cherry-pick the tip and not merge the entire branch.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp893193-acq-po-state-constraint-2_0-and-2_1

tags: added: pullrequest
Revision history for this message
Michael Peters (mrpeters) wrote :

Tested /user/berick/lp893193-acq-po-state-constraint against master and it did the job.

Don't have a 2.1 test system right now, but I can't imagine any reason it wouldn't work the same there.

user/mrpeters-isl/lp893193-acq-po-state-constraint_signoff
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=commitdiff;h=c3be6b1601cd3da23ffbc040eee89a7674b40a2d

tags: added: acq signedoff
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Merged to master, rel_2_2 and rel_2_1 (rel_2_0 being dead).

Thanks Ben, Bill, and Mike!

Changed in evergreen:
status: Fix Committed → Fix Released
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.