[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 5bd210333705f8e339ddf4337b55fba8587b349a

Evergreen Git git at git.evergreen-ils.org
Wed Oct 26 17:17:28 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_1 has been updated
       via  5bd210333705f8e339ddf4337b55fba8587b349a (commit)
      from  d499871c02b00ced5268f1057db2d7ff96ad4905 (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 5bd210333705f8e339ddf4337b55fba8587b349a
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/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
index dafa288..699a6bb 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/lib/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:
 .../perlmods/lib/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