Bug 38429

Summary: Ambiguous patron category when adding a new guarantee
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: PatronsAssignee: Lucas Gass (lukeg) <lucas>
Status: Pushed to stable --- QA Contact: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Severity: normal    
Priority: P5 - low CC: alexbuckley, baptiste.wojtkowski, david, gmcharlt, jesse, jheltibridle, kyle.m.hall, laura, paul.derscheid
Version: MainKeywords: rel_24_05_candidate
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
This improves adding a guarantee for a patron (+ Add guarantee). Where there is more than one patron category that can be a guarantee, the add guarantee button now includes a dropdown list of the categories. This removes the need to manually select the patron category on the patron add form - previously, if not changed, the first patron category in the list was selected by default.
Version(s) released in:
25.05.00,24.11.02
Circulation function:
Bug Depends on:    
Bug Blocks: 39244    
Attachments: Bug 38429: Add dropdown to Add gaurantee button if multiple categories are allowed
Bug 38429: Add dropdown to Add gaurantee button if multiple categories are allowed
Bug 38429: Add dropdown to Add guarantee button if multiple categories are allowed

Description Lucas Gass (lukeg) 2024-11-12 20:43:16 UTC
To recreate:
1. Have multiple patron categories that are set to 'Can be guarantee'.
2. Go to a patron record and click '+ Add guarantee'
3. Look at how the patron category is set.
4. It defaults to the first one alphabetically, by code.

In step 2, I think we need a dropdown that would prompt staff to choose the correct category.
Comment 1 Lucas Gass (lukeg) 2024-11-12 22:03:04 UTC
Created attachment 174440 [details] [review]
Bug 38429: Add dropdown to Add gaurantee button if multiple categories are allowed

To test:
1. Have multiple patron categories that are set to 'Can be guarantee'.
2. Go to a patron record and click '+ Add guarantee'
3. Look at how the patron category is set.
4. It defaults to the first one alphabetically, by code.
5. APPLY PATCH
6. Try steps 1 -2 again, this time you should get a dropdown to pick which category of guarantee you want.
7. Add some patron categories that can be gaurantees with library limitations. Make sure they only show for the correct libraries.
8. Set only patron category to be a gaurantee. The dropdown should now be a button.
Comment 2 ByWater Sandboxes 2024-11-19 21:22:24 UTC
Created attachment 174812 [details] [review]
Bug 38429: Add dropdown to Add gaurantee button if multiple categories are allowed

To test:
1. Have multiple patron categories that are set to 'Can be guarantee'.
2. Go to a patron record and click '+ Add guarantee'
3. Look at how the patron category is set.
4. It defaults to the first one alphabetically, by code.
5. APPLY PATCH
6. Try steps 1 -2 again, this time you should get a dropdown to pick which category of guarantee you want.
7. Add some patron categories that can be gaurantees with library limitations. Make sure they only show for the correct libraries.
8. Set only patron category to be a gaurantee. The dropdown should now be a button.

Signed-off-by: Laura ONeil <laura@bywatersolutions.com>
Comment 3 Baptiste Wojtkowski (bwoj) 2024-12-11 15:07:00 UTC
Created attachment 175374 [details] [review]
Bug 38429: Add dropdown to Add guarantee button if multiple categories are allowed

To test:
1. Have multiple patron categories that are set to 'Can be guarantee'.
2. Go to a patron record and click '+ Add guarantee'
3. Look at how the patron category is set.
4. It defaults to the first one alphabetically, by code.
5. APPLY PATCH
6. Try steps 1 -2 again, this time you should get a dropdown to pick which category of guarantee you want.
7. Add some patron categories that can be gaurantees with library limitations. Make sure they only show for the correct libraries.
8. Set only patron category to be a gaurantee. The dropdown should now be a button.

Signed-off-by: Laura ONeil <laura@bywatersolutions.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 4 Baptiste Wojtkowski (bwoj) 2024-12-11 15:13:43 UTC
Passing QA, and looks like other ways to create patron by selecting category, so it makes sense to make this improvement.

Shouldn't we try and create an include for such a kind of button, which open a form to create a patron by pre-selecting the category ?
Comment 5 Katrin Fischer 2024-12-23 08:38:11 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 6 Juliet Heltibridle 2025-01-05 00:07:05 UTC
Will this be backported? I would love to see it as soon as possible, as it would clean up a lot of errors we see during child registrations.
Comment 7 Paul Derscheid 2025-02-03 19:09:13 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.01
Comment 8 Alex Buckley 2025-02-13 01:53:15 UTC
Hi, 

When applying this patch to the 24.05 branch it breaks the '+ Add guarantee' button on a patron record.

When you click this button, with the patch applied, nothing happens.

Can somebody please fix it?
Comment 9 Alex Buckley 2025-02-20 01:35:23 UTC
(In reply to Alex Buckley from comment #8)
> Hi, 
> 
> When applying this patch to the 24.05 branch it breaks the '+ Add guarantee'
> button on a patron record.
> 
> When you click this button, with the patch applied, nothing happens.
> 
> Can somebody please fix it?

Hi Lucas, 

Would you mind please taking a look at fixing the problem we noted above when we apply this patchset on 24.05.x branch?

Thanks,
Alex
Comment 10 Jesse Maseto 2025-06-13 15:20:30 UTC
I still see the same behavior. After applying the patch and then clicking on Add guarantee on a patron account page - The +Add guarantee button is not functional.