Acquisitions: Entire Selection List not transferring when Creating a Purchase order

Bug #810030 reported by Mary Llewellyn
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.0
Fix Released
Undecided
Unassigned
2.1
Fix Released
Undecided
Unassigned
2.2
Fix Released
Undecided
Unassigned

Bug Description

Evergreen version: 2.0.6
OpenSRF version: 2.0.0
PostgreSQL version: 8.4
Linux distribution: Ubuntu 10.04 Lucid

When a selection list has more than 20 lineitems, the entire list does not go to the purchase order, even if "All lineitems" is the selected choice on the window that pops up when you choose "Create purchase order." In one case, a selection list of 31 item resulted in 20 items tranferring; in another, a selection list of 58 lines resulted in 30 transferring.

summary: - Aquistions: Entire Selection List not transferring when Creating a
+ Aquisitions: Entire Selection List not transferring when Creating a
Purchase order
description: updated
Ben Shum (bshum)
tags: added: 2.0 acq
Changed in evergreen:
status: New → Confirmed
Changed in evergreen:
importance: Undecided → Low
Revision history for this message
Ben Shum (bshum) wrote : Re: Aquisitions: Entire Selection List not transferring when Creating a Purchase order

It would appear that "all lineitems" only refers to the 20 line items that appear on the first page of line items in a selection list. If there are subsequent pages with additional line items, they are not moved over to the purchase order. You can view the rest of a selection list by using the "Next" button, but there does not seem to be any way to select items from different pages of a selection list to pass to the purchase order creation.

Changed in evergreen:
importance: Low → Medium
summary: - Aquisitions: Entire Selection List not transferring when Creating a
+ Acquisitions: Entire Selection List not transferring when Creating a
Purchase order
James Fournie (jfournie)
Changed in evergreen:
assignee: nobody → James Fournie (jfournie)
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

I think the commit at the head of the following branch thoroughly addresses this issue. Please see the commit message.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/senator/lp-810030

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

Wow, senator++ indeed! Tested this on one of our test systems and appears to not break anything. As expected, the loading process for a selection list of line items to transfer to a purchase order was a beast to process (and my client hung for a bit as it was thinking and processing), but all line items transferred to the purchase order in my test (131 line items to PO).

I notice that in your comments for the code, there was this line "XXX memory leak waiting to happen?" added to li_table_pager.js. Is that a general warning about very large PO creation being troublesome for the system down the road?

Either way, senator++

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

Confirmed this cherrypicks into 2.1 and 2.0, so I've done that.

Changed in evergreen:
status: Confirmed → Fix Committed
Revision history for this message
James Fournie (jfournie) wrote :

Guess I won't try and fix this then :)

Changed in evergreen:
assignee: James Fournie (jfournie) → nobody
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Thanks for the feedback all.

To answer Ben's question, the comment about a memory leak actually had to do with circular references. An instance of LiTablePager will have references to an instance of AcqLiTable, and the latter will have references to the former, too.

After refreshing myself on the topic of Javascript garbage collection, I apparently had too little faith in it, and circular references should be no problem.

Changed in evergreen:
milestone: none → 2.1.1
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.