Comment 3 for bug 1607922

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.