Bug 38429 - Ambiguous patron category when adding a new guarantee
Summary: Ambiguous patron category when adding a new guarantee
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Baptiste Wojtkowski (bwoj)
URL:
Keywords: rel_24_05_candidate
Depends on:
Blocks: 39244
  Show dependency treegraph
 
Reported: 2024-11-12 20:43 UTC by Lucas Gass (lukeg)
Modified: 2025-03-04 21:08 UTC (History)
8 users (show)

See Also:
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:


Attachments
Bug 38429: Add dropdown to Add gaurantee button if multiple categories are allowed (3.46 KB, patch)
2024-11-12 22:03 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 38429: Add dropdown to Add gaurantee button if multiple categories are allowed (3.52 KB, patch)
2024-11-19 21:22 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 38429: Add dropdown to Add guarantee button if multiple categories are allowed (3.58 KB, patch)
2024-12-11 15:07 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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