Bug 33788

Summary: Items tab shows all previous borrowers instead of 3
Product: Koha Reporter: Sara Brown <sbrown>
Component: Staff interfaceAssignee: Bugs List <koha-bugs>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: blawlor, fridolin.somers, gmcharlt, kebliss, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.07
Bug Depends on: 32272    
Bug Blocks:    
Attachments: moredetail.pl
Bug 33788: Limit the number of old issues rows returned
Bug 33788: Limit the number of old issues rows returned

Description Sara Brown 2023-05-19 17:40:52 UTC
Created attachment 151488 [details]
moredetail.pl

Instead of showing the last 3 borrowers per bug 32272, moredetail.pl is showing all previous borrowers for items (see attached).
Comment 1 Brendan Lawlor 2023-05-19 18:36:46 UTC
One possible workaround I thought of would be to use javascript to remove all children <li> after the sixth one in the <ol class="bibliodetails"> on the item details page.
Comment 2 Nick Clemens (kidclamp) 2023-05-26 14:47:09 UTC
Created attachment 151763 [details] [review]
Bug 33788: Limit the number of old issues rows returned

This patch updates the parameter from 'limit' to 'rows'

To test:
1 - Checkout an item to 5 different people
2 - View item details on items tab of record
3 - Note you see last borrower, and three previous borrowers
4 - Apply patch, restart all
5 - Refresh page
6 - You shoulw now only see last borrower and 2 previous borrowers
Comment 3 Katrin Fischer 2023-05-29 16:54:08 UTC
Created attachment 151782 [details] [review]
Bug 33788: Limit the number of old issues rows returned

This patch updates the parameter from 'limit' to 'rows'

To test:
1 - Checkout an item to 5 different people
2 - View item details on items tab of record
3 - Note you see last borrower, and three previous borrowers
4 - Apply patch, restart all
5 - Refresh page
6 - You shoulw now only see last borrower and 2 previous borrowers

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2023-05-29 16:54:44 UTC
Very small, save, no strings.
Comment 5 Tomás Cohen Arazi 2023-05-30 11:29:22 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 6 Matt Blenkinsop 2023-06-08 17:28:58 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 7 Fridolin Somers 2023-06-23 07:27:54 UTC
Good catch ;)

The doc :
https://metacpan.org/pod/DBIx::Class::ResultSet#rows