Avoid a possible bug in selection list deletion user/senator/acq-delete-picklist-bugfix-updated
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 6 Oct 2011 22:06:22 +0000 (18:06 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 12 Oct 2011 21:31:15 +0000 (17:31 -0400)
commitf3877e73f3b3710e36329efbd7b1f3ce2ca001a6
tree40c0caa79e6497b8ca801d9e7e4d370bb86b6ee3
parent4d6da36ad97c638af7aef89734dc9cb90e3c1020
Avoid a possible bug in selection list deletion

This particularly matters for the "ephemeral," unnamed selection list that
Acquisitions General Search uses to hold bib records represented as
lineitems, as that list is deleted for the next run of that kind of
search.

It's possible to get lineitems onto that list that are in a state
other than "new".  Code that deletes this list first deletes the
lineitems that belong to it, but that code formerly assumed that there
are two types of lineitems. "new" ones (that should be deleted) and ones
that belong to purchase orders (that should be deatched).  That doesn't
necessarily cover all possible lineitems on the picklist, so deletion
ultimately fails.

This fixes that.

[update: now this bugfix incorporates a bugfix, the need for which was
detected by Ben Shum. See LP #869581]

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm