Mark Selected Items as Received Fails on Pages After First

Bug #1607922 reported by John Yorio
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.3
Fix Released
Medium
Unassigned

Bug Description

Evergreen: 2.9 and 2.10

Batch selecting items to Mark Selected Line Items as Received works for the first page of times in the Acquisitions| General Search, but not on subsequent pages. The system spins but does not process the items.

Closing and repeating the search and individually selecting items on the subsequent pages does work.

Steps to trigger:

This requires a sufficient number of items to get at least 2 pages of results when doing an Acquisitions Search.

1) Create a text file of ISBNs for items to mark as received
2) Go to Acquisitions | General Search
3) Search for line items matching all of the following terms: LIA-ISBN "matchs a term from a file" and then browse to the file of ISBNs created in step 1.
4) Click the checkmark to select all of the items on the first page
5) From Actions, select Mark Selected Line Items as Received.
6) Advance to the next page of results
7) Repeat step 4
8) Repeat step 5.

The expectation was that the batch process should work the same on each page.

Remington Steed (rjs7)
tags: added: acq
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Confirmed on 2.12. A note that this might seem like a really specific issue, but it really slows down the acquisitions receiving process in our consortium.

Changed in evergreen:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Millissa (millissam) wrote :

Would really love to see this feature fixed. Receiving items is very cumbersome. We now do the receiving when we close the invoice, which could be sometime after receiving the items because not all items arrive at the same time for one invoice.

Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbej)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Here is a branch: user/sandbergja/lp1607922_li_table_pagination
Here is a link: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sandbergja/lp1607922_li_table_pagination

This appears to be a result of a well-intentioned effort to remember
which line items staff had selected across multiple pages, but
unfortunately, Evergreen was only caching half of the data it needed in
order to do so. Since the current behavior is that the UI does not
remember selections between pages, it seems that we should not attempt
to change this behavior for now, and just fix the receiving bug.

Here is the novel I wrote in the commit message:

Previously, if a user selected a bunch of line items on two consecutive
pages of acq search results, and tried to receive items from the second
page, the operation would fail.

This issue was caused by Evergreen caching IDs of selected line items
from page 1, but not caching the data that went along with them.

To test:

1) Go to Acquisitions > General Search
2) In the Select Search Field dropdown, choose LI - State.
3) Set the state to on-order.
4) Click Search.
5) Click the check mark to select all results on the first page.
6) Click the Next button.
7) Click the check mark to select all results on the second page.
8) On the top --Actions-- menu, select Mark Selected Line Items as
Received.
9) Note that the interface does nothing, and that there is a TypeError
error message in the browser console.
10) Apply this commit.
11) Refresh your page completely and repeat steps 1-8.
12) Note that the items on the second page are received. Since they no
longer meet the search criteria, Evergreen gives you the next page of
results.

For further testing, see similar test steps by John Yorio at
https://bugs.launchpad.net/evergreen/+bug/1607922.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 3.3.3
assignee: Jane Sandberg (sandbej) → nobody
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Just a note that we've been running this in production for the past month or so, and we haven't noticed any side effects.

Changed in evergreen:
milestone: 3.3.3 → 3.3.4
Changed in evergreen:
milestone: 3.3.4 → 3.3.5
Changed in evergreen:
milestone: 3.3.5 → 3.4.2
Revision history for this message
Chris Sharp (chrissharp123) wrote :

Works for me! Pushed to rel_3_3, rel_3_4, and master, though this fix could be safely backported to any recent version. Thanks, Jane!

Changed in evergreen:
status: Confirmed → Fix Committed
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.