Acq: fix bug in selection list delete operation

Bug #869581 reported by Lebbeous Fogle-Weekley
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Low
Bill Erickson
2.0
Fix Released
Undecided
Unassigned
2.1
Fix Released
Undecided
Unassigned
2.2
Fix Released
Undecided
Unassigned

Bug Description

Evergreen 2.0+

    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.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/senator/acq-delete-picklist-bugfix

Revision history for this message
Ben Shum (bshum) wrote :

Applied to one of our 2.0 test servers and appears to correct the issue. Apparently our staff just noticed that deletion of line items from a selection list was wonky just recently (not that they've had renewed interest in using Acq with the recent patches made).

Thanks, senator! +1 to merging it in.

tags: added: acq
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Don't merge just yet. Ben Shum reports trouble now. http://paste.lisp.org/display/125277

Diagnosis soon.

tags: removed: pullrequest
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

I believe the pertinent issue that was causing Ben's symptoms and preventing my patch from working correctly was that on line 861 of Order.pm, I had curly braces in the wrong place, defining a hash reference where there should have been a key.

This was the telltale error message: 2011-10-12 13:25:19 bill1 open-ils.cstore: [ERR :23439:oils_sql.c:3429:1318439631234141] open-ils.cstore: Attempt to reference non-existent column "HASH(0x497a088)" on acq.lineitem (jub)

and of it led to other messages later.

Ben, can you test this version of the patch instead of the old one? I think it's really right now.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/senator/acq-delete-picklist-bugfix-updated

Revision history for this message
Ben Shum (bshum) wrote :

Tested this version on our 2.0 systems and it's behaving much better now.

MARC Federated Search can retrieve results without errors, and deleting line items from selection list works as well.

Looks like we're good to go now!

Thanks Lebbeous!

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

Merged to master, rel_2_1, and rel_2_0.

Changed in evergreen:
status: Confirmed → In Progress
assignee: nobody → Bill Erickson (erickson-esilibrary)
status: In Progress → Fix Committed
Revision history for this message
Tim Spindler (tspindler-cwmars) wrote :

I think this is related to an issue I am seeing in Alpha 2.2. I had a selection list and created a number of POs. I deleted the the line items on the selection list screen and this seems to have broken the POs so they are no longer displaying any titles.

Ben Shum (bshum)
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.