Bug 30935

Summary: Holds to pull shows wrong first patron
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: Hold requestsAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: alexbuckley, arthur.suzuki, gmcharlt, kyle, librarydirector, lucas, nick, sally.healey, shi-yao.wang, tomascohen, victor
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:
22.11.00, 22.05.05, 21.11.12
Circulation function:
Attachments: List of holds for the title
Holds to pull list shows third patron
Bug 30935: Holds to pull shows wrong first patron
Bug 30935: Holds to pull shows wrong first patron

Description Caroline Cyr La Rose 2022-06-09 15:20:20 UTC
I've seen a couple of bugs on this and they're all 'Resolved' but I still see the problem. Maybe it's not the exact same thing... So I'm creating this in case. Someone else can test and tell me if I'm crazy or not.

When a biblio has more than one hold (record-level), the 'First patron' column on the 'Holds to pull' report is not showing the actual first patron, but the last in the line.

I tried it on a bywater sandbox, just in case it was my installation that was the problem, and it does the same thing.

To test :
1) Place a record-level hold on a biblio with an available item
2) Check the Holds to pull page (circ/pendingreserves.pl)
--> The biblio should appear in the list and the patron should appear in the 'First patron' column
3) Place a second record-level hold on the same biblio
4) Go back to the Holds to pull page
--> The biblio is still there, but the patron in the 'First patron' column is the second patron 
5) Place a third record-level hold on the same biblio
6) Go back to the Holds to pull page
--> The biblio is still there, but the patron in the 'First patron' column is the third patron 

Other bugs I found that talk about this: Bug 24488 (Closed fixed), Bug 30337 (pushed to master)
Comment 1 Caroline Cyr La Rose 2022-06-09 15:20:47 UTC
Created attachment 135904 [details]
List of holds for the title
Comment 2 Caroline Cyr La Rose 2022-06-09 15:21:36 UTC
Created attachment 135905 [details]
Holds to pull list shows third patron
Comment 3 Caroline Cyr La Rose 2022-06-09 15:25:13 UTC
I added some screenshots of the sandbox.

Just in case it's relevant...

In about, it says I'm at version 22.06.00.001

The last commit in the git log is 
commit d9e8a0e9d23a62e64a1b67e96e0dd2de9613e2ab
Author: Tomás Cohen Arazi <tomascohen@theke.io>
Date:   Tue Jun 7 09:36:31 2022 -0300

    Bug 13614: Compiled CSS
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>


In the git log of the sandbox, I see the patch for Bug 30337 but not the one for bug 24488 (probably because it's too old, I'm not sure how many commits that git log shows)
Comment 4 Shi Yao Wang 2022-06-29 15:20:10 UTC
Created attachment 136741 [details] [review]
Bug 30935: Holds to pull shows wrong first patron

When different patrons have item level holds on the same item, Holds to
pull shows wrong first patron.

Test plan:
1) Place a record-level hold on a biblio with an available item
2) Check the Holds to pull page (circ/pendingreserves.pl)
--> The biblio should appear in the list and the patron should appear in the 'First patron' column
3) Place a second record-level hold on the same biblio
4) Go back to the Holds to pull page
--> The biblio is still there, but the patron in the 'First patron' column is the second patron
5) Place a third record-level hold on the same biblio
6) Go back to the Holds to pull page
--> The biblio is still there, but the patron in the 'First patron' column is the third patron
7) Apply the patch
8) Go back to the Holds to pull page
--> The biblio is still there and the patron in the 'First patron' column is the first patron
Comment 5 Biblibre Sandboxes 2022-07-12 08:41:57 UTC
Created attachment 137611 [details] [review]
Bug 30935: Holds to pull shows wrong first patron

When different patrons have item level holds on the same item, Holds to
pull shows wrong first patron.

Test plan:
1) Place a record-level hold on a biblio with an available item
2) Check the Holds to pull page (circ/pendingreserves.pl)
--> The biblio should appear in the list and the patron should appear in the 'First patron' column
3) Place a second record-level hold on the same biblio
4) Go back to the Holds to pull page
--> The biblio is still there, but the patron in the 'First patron' column is the second patron
5) Place a third record-level hold on the same biblio
6) Go back to the Holds to pull page
--> The biblio is still there, but the patron in the 'First patron' column is the third patron
7) Apply the patch
8) Go back to the Holds to pull page
--> The biblio is still there and the patron in the 'First patron' column is the first patron

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 6 Sally 2022-07-12 08:42:55 UTC
Works as described; thanks for the patch!
Comment 7 Victor Grousset/tuxayo 2022-07-13 21:56:44 UTC
Works, qa script happy, code looks good, passing QA :)
Comment 8 Tomás Cohen Arazi (tcohen) 2022-07-19 12:54:58 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 9 Lucas Gass (lukeg) 2022-08-23 19:42:49 UTC
Backported to 22.05.x for 22.05.05
Comment 10 Alex Buckley 2022-08-25 23:36:30 UTC
*** Bug 31467 has been marked as a duplicate of this bug. ***
Comment 11 Arthur Suzuki 2022-08-30 09:28:15 UTC
thx pushed to 21.11.x for 21.11.12
Comment 12 Victor Grousset/tuxayo 2022-09-14 19:27:35 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.
Comment 13 Kyle M Hall (khall) 2022-09-22 13:06:09 UTC
*** Bug 31600 has been marked as a duplicate of this bug. ***
Comment 14 Steve Butzel 2022-11-16 15:11:29 UTC
Can't wait to see this fix implemented. I'm so glad that it appears to have been solved. 

Thanks,
Steve