Bug 39022 - Last patron is replaced by current patron on page load
Summary: Last patron is replaced by current patron on page load
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Emily Lamancusa (emlam)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-03 19:25 UTC by Nick Clemens (kidclamp)
Modified: 2025-02-07 16:10 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 39022: Display the current previous patron list before updating stored values (3.51 KB, patch)
2025-02-03 19:28 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 39022: Display the current previous patron list before updating stored values (3.56 KB, patch)
2025-02-03 22:18 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 39022: Display the current previous patron list before updating stored values (3.63 KB, patch)
2025-02-07 16:10 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2025-02-03 19:25:17 UTC
Before bug 21246 Koha only stored a single last patron - when loading a new patron we would preserve the previous patron during the initial page load. After loading we would replace the stored patron so that the next page load would display the most recent patron.

After bug 21246 we began to update the list of patrons to display, add the new one, then display.

This means as soon as you load a patron you cannot get back to the previous patron.

To test:
1 - Enable showLastPatron system preference and set showLastPatronCount to 1
2 - Go to a patron, say Ronnie Ballard
3 - Note you have a link to 'Last patron' - hover or click split dropdown and see it is the patron you are viewing
4 - Search for another patron, Edna Acosta
5 - Note the 'Last patron' links point to Edna, and not Ronnie
Comment 1 Nick Clemens (kidclamp) 2025-02-03 19:28:46 UTC
Created attachment 177476 [details] [review]
Bug 39022: Display the current previous patron list before updating stored values

This patch just reverses the order so we display the list, then update it.

To test:
 1 - Enable showLastPatron system preference and set showLastPatronCount to 1
 2 - Go to a patron, say Ronnie Ballard
 3 - Note you have a link to 'Last patron' - hover or click split dropdown and see it is the patron you are viewing
 4 - Search for another patron, Edna Acosta
 5 - Note the 'Last patron' links point to Edna, and not Ronnie
 6 - Apply patch
 7 - Reload Edna, note last patron lists Edna
 8 - Search for Ronnie
 9 - Confirm previous patron is linked to Edna
10 - Click the link to go to Edna
11 - Confirm last patron now links to Ronnie
12 - Instead of following link, click on another tab for patron
13 - Now the link is updated to current patron, this was behaviour before 21246 as well
14 - Sign off.
Comment 2 Roman Dolny 2025-02-03 22:18:30 UTC
Created attachment 177491 [details] [review]
Bug 39022: Display the current previous patron list before updating stored values

This patch just reverses the order so we display the list, then update it.

To test:
 1 - Enable showLastPatron system preference and set showLastPatronCount to 1
 2 - Go to a patron, say Ronnie Ballard
 3 - Note you have a link to 'Last patron' - hover or click split dropdown and see it is the patron you are viewing
 4 - Search for another patron, Edna Acosta
 5 - Note the 'Last patron' links point to Edna, and not Ronnie
 6 - Apply patch
 7 - Reload Edna, note last patron lists Edna
 8 - Search for Ronnie
 9 - Confirm previous patron is linked to Edna
10 - Click the link to go to Edna
11 - Confirm last patron now links to Ronnie
12 - Instead of following link, click on another tab for patron
13 - Now the link is updated to current patron, this was behaviour before 21246 as well
14 - Sign off.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Emily Lamancusa (emlam) 2025-02-07 16:10:33 UTC
Created attachment 177639 [details] [review]
Bug 39022: Display the current previous patron list before updating stored values

This patch just reverses the order so we display the list, then update it.

To test:
 1 - Enable showLastPatron system preference and set showLastPatronCount to 1
 2 - Go to a patron, say Ronnie Ballard
 3 - Note you have a link to 'Last patron' - hover or click split dropdown and see it is the patron you are viewing
 4 - Search for another patron, Edna Acosta
 5 - Note the 'Last patron' links point to Edna, and not Ronnie
 6 - Apply patch
 7 - Reload Edna, note last patron lists Edna
 8 - Search for Ronnie
 9 - Confirm previous patron is linked to Edna
10 - Click the link to go to Edna
11 - Confirm last patron now links to Ronnie
12 - Instead of following link, click on another tab for patron
13 - Now the link is updated to current patron, this was behaviour before 21246 as well
14 - Sign off.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>