[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 87d60457ef07ad45eeb3724c7865cfb0f811bcac
Evergreen Git
git at git.evergreen-ils.org
Wed Oct 26 17:17:52 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_0 has been updated
via 87d60457ef07ad45eeb3724c7865cfb0f811bcac (commit)
from 67f6757e91abf632e2185b2d3d89a1b002f5fcf4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 87d60457ef07ad45eeb3724c7865cfb0f811bcac
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date: Thu Oct 6 18:06:22 2011 -0400
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 at esilibrary.com>
Signed-off-by: Bill Erickson <berick at esilibrary.com>
diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
index 7c6b228..7fdf6a6 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
@@ -851,7 +851,13 @@ sub delete_picklist {
$picklist = $mgr->editor->retrieve_acq_picklist($picklist) unless ref $picklist;
# delete all 'new' lineitems
- my $li_ids = $mgr->editor->search_acq_lineitem({picklist => $picklist->id, state => 'new'}, {idlist => 1});
+ my $li_ids = $mgr->editor->search_acq_lineitem(
+ {
+ picklist => $picklist->id,
+ "-or" => {state => "new", purchase_order => undef}
+ },
+ {idlist => 1}
+ );
for my $li_id (@$li_ids) {
my $li = $mgr->editor->retrieve_acq_lineitem($li_id);
return 0 unless delete_lineitem($mgr, $li);
-----------------------------------------------------------------------
Summary of changes:
.../src/perlmods/OpenILS/Application/Acq/Order.pm | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list