Bug 35366

Summary: Circulation history of patron is only visible when there is a current checkout
Product: Koha Reporter: Victor Grousset/tuxayo <victor>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Bug Depends on: 33948    
Bug Blocks:    
Attachments: Bug 35366: (bug 33948 follow-up) Fix display of old checkouts if no checkouts exist
Bug 35366: (bug 33948 follow-up) Fix display of old checkouts if no checkouts exist
Bug 35366: (bug 33948 follow-up) Fix display of old checkouts if no checkouts exist

Description Victor Grousset/tuxayo 2023-11-18 20:21:50 UTC
=== test plan ===
1. do a checkout
2. looks a circulation history of the patron, it's here
3. check in
4. history gets empty ﷐[U+1F62E]﷑️
5. do a checkout
6. history now shows the two checkouts ﷐[U+1F62E]﷑

History in OPAC is ok.
Comment 1 Jonathan Druart 2023-11-24 07:06:00 UTC
Created attachment 159224 [details] [review]
Bug 35366: (bug 33948 follow-up) Fix display of old checkouts if no checkouts exist

Same patch as
  commit bee2b3d33ed6030b5a63d22148b9955a9897e51d
  Bug 33949: Fix display of old checkouts if no checkouts exist

But for the staff interface.

"""
If we pass an empty array from the perl controller, we retrieve an empty
string from the template, and the merge does not work.

This patch fixes the following bug:
Pick a patron without checkout history
Check them an item out and check it in
=> The table is empty, whereas it should display the item that has been
checked in.
"""
Comment 2 David Nind 2023-11-24 20:12:09 UTC
Created attachment 159245 [details] [review]
Bug 35366: (bug 33948 follow-up) Fix display of old checkouts if no checkouts exist

Same patch as
  commit bee2b3d33ed6030b5a63d22148b9955a9897e51d
  Bug 33949: Fix display of old checkouts if no checkouts exist

But for the staff interface.

"""
If we pass an empty array from the perl controller, we retrieve an empty
string from the template, and the merge does not work.

This patch fixes the following bug:
Pick a patron without checkout history
Check them an item out and check it in
=> The table is empty, whereas it should display the item that has been
checked in.
"""

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Victor Grousset/tuxayo 2023-11-26 23:17:54 UTC
Created attachment 159257 [details] [review]
Bug 35366: (bug 33948 follow-up) Fix display of old checkouts if no checkouts exist

Same patch as
  commit bee2b3d33ed6030b5a63d22148b9955a9897e51d
  Bug 33949: Fix display of old checkouts if no checkouts exist

But for the staff interface.

"""
If we pass an empty array from the perl controller, we retrieve an empty
string from the template, and the merge does not work.

This patch fixes the following bug:
Pick a patron without checkout history
Check them an item out and check it in
=> The table is empty, whereas it should display the item that has been
checked in.
"""

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 4 Victor Grousset/tuxayo 2023-11-26 23:18:15 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 5 Tomás Cohen Arazi (tcohen) 2023-11-26 23:51:29 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!