Support PO activation without requiring bibs/items

Bug #833820 reported by Bill Erickson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

Currently, it's not possible in Evergreen to activate a purchase order without loading/linking the bibs and copies into the "main" database (i.e. biblio.record_entry, asset.call_number, asset.copy). This patch creates a new "Activate PO Without Loading Items" option in the PO display and activates the PO without, well, loading items and copies.

I've tested this patch through a full order cycle, including invoicing, printing worksheets, printing invoice vouchers, etc. I have not had any trouble with it, but other eyes/testers would be appreciated, since activated PO's are generally assumed to have copies attached.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/acq-po-activation-sans-assets

Evergreen 2.2 / OpenSRF 2.0 / Postgres 9.0.4 / Debian Squeeze

Revision history for this message
Mike Rylander (mrylander) wrote :

Picked into master for great justice!

Changed in evergreen:
status: New → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
Revision history for this message
Bill Erickson (berick) wrote :

Re-opening ticket since only 1 of the 2 commits in the feature branch were merged. The second, merged commit is effectively irrelevant without the first commit.

The un-merged commit conflicts heavily with current master. Will push an updated feature branch after conflict resolution.

Changed in evergreen:
status: Fix Released → In Progress
assignee: nobody → Bill Erickson (erickson-esilibrary)
tags: added: acq
removed: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :

Pushed an updated branch to working => user/berick/acq-po-activation-sans-assets-round2

Commit which needs to be merged is:

commit 08ac64caf47de7d5e6ff5d0a7f8c8a0a53f81cb2
Author: Bill Erickson <email address hidden>
Date: Tue Nov 27 15:26:48 2012 -0500

    Support PO activation w/o loading items
    ....

Changed in evergreen:
milestone: none → 2.4.0-alpha
status: In Progress → New
assignee: Bill Erickson (erickson-esilibrary) → nobody
importance: Undecided → Wishlist
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Sounds like someone, other than Bill, who can test acquistions should test the updated branch.

Changed in evergreen:
status: New → Triaged
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-alpha1 → 2.4.0-beta
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-beta → 2.4.0-rc
no longer affects: evergreen/master
tags: added: pullrequest
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-rc → none
Ben Shum (bshum)
Changed in evergreen:
milestone: none → 2.5.0-m1
Dan Wells (dbw2)
Changed in evergreen:
milestone: 2.5.0-m1 → 2.5.0-m2
Revision history for this message
Kathy Lussier (klussier) wrote :

Hi Bill,

Looks like this one has been gathering dust. We're getting a conflict with your round 2 branch. Can you rebase it?

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

Hah, gathering dust indeed.. going on 2 years. Rebased code pushed to

working/user/berick/acq-po-activation-sans-assets-round3

I've also removed the (old) 2.2, 2.3, and 2.4 targets from this LP entry since this is more of a feature than a bug fix.

no longer affects: evergreen/2.2
no longer affects: evergreen/2.3
no longer affects: evergreen/2.4
Revision history for this message
Kathy Lussier (klussier) wrote :
tags: added: signedoff
Revision history for this message
Dan Wells (dbw2) wrote :

Hello Bill,

I am interested in pushing this, but I have one concern first. It seems like this change:

@@ -2659,7 +2664,7 @@ sub activate_purchase_order_impl {
         $li->state('on-order');
         $li->claim_policy($provider->default_claim_policy)
             if $provider->default_claim_policy and !$li->claim_policy;
- create_lineitem_debits($mgr, $li, $dry_run, $options) or return $e->die_event;
+ create_lineitem_debits($mgr, $li, $dry_run) or return $e->die_event;
         update_lineitem($mgr, $li) or return $e->die_event;
         $mgr->post_process( sub { create_lineitem_status_events($mgr, $li->id, 'aur.ordered'); });
         $mgr->respond;

effectively prevents the 'zero-copy-activate' option from reaching create_lineitem_debits, but that sub still looks for the option. Is this a mistake, or dead code, or something else I am not understanding?

Thanks,
Dan

Changed in evergreen:
assignee: nobody → Dan Wells (dbw2)
Revision history for this message
Bill Erickson (berick) wrote :

Good eyes, Dan! It was a mistake -- a partial attempt at consolidating $dry_run and $options. I've pushed a rebased branch with a fix for that issue and a sign-off for Kathy's release notes (Thanks, Kathy!) to:

working/user/berick/acq-po-activation-sans-assets-round4

Revision history for this message
Dan Wells (dbw2) wrote :

Fix looks good to me, thanks Bill and Kathy.

Pushed to master... finally! :)

Changed in evergreen:
assignee: Dan Wells (dbw2) → nobody
status: Triaged → Fix Committed
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.