Avoid a possible bug in selection list deletion user/senator/acq-delete-picklist-bugfix
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 6 Oct 2011 22:06:22 +0000 (18:06 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 6 Oct 2011 22:06:22 +0000 (18:06 -0400)
commit3366c6dee157d2ff421a009faee19bbe01c2bc98
tree58bc13ddc25f5264a4c3b4a5ae5fdde446e6baa2
parent1dc246008f287819da7ad9107e87a5bd967dbdae
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.

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