Bug 30874

Summary: Simplify patron category handling in memberentry
Product: Koha Reporter: Jonathan Druart <jonathan.druart+koha>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart+koha>
Status: RESOLVED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: joonas.kylmala, lucas, m.de.rooy, martin.renvoize, nick, tomascohen, victor
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Bug Depends on: 12446    
Bug Blocks:    
Attachments: Bug 30874: Replace categoryname
Bug 30874: Reduce number of category fetches
Bug 30874: 2 more - need more investigation
Bug 30874: Simplify categories loop construction
Bug 30874: Simplify categories loop construction
Bug 30874: Remove category_type
Bug 30874: Replace categoryname
Bug 30874: Reduce number of category fetches
Bug 30874: 2 more - need more investigation
Bug 30874: Simplify categories loop construction
Bug 30874: Remove category_type
Bug 30874: Replace categoryname
Bug 30874: Reduce number of category fetches
Bug 30874: 2 more - need more investigation
Bug 30874: Simplify categories loop construction
Bug 30874: Remove category_type
Bug 30874: Replace categoryname
Bug 30874: Reduce number of category fetches
Bug 30874: 2 more - need more investigation
Bug 30874: Simplify categories loop construction
Bug 30874: Remove category_type

Description Jonathan Druart 2022-06-01 08:08:39 UTC

    
Comment 1 Jonathan Druart 2022-06-01 08:10:50 UTC
Created attachment 135524 [details] [review]
Bug 30874: Replace categoryname
Comment 2 Jonathan Druart 2022-06-01 08:10:54 UTC
Created attachment 135525 [details] [review]
Bug 30874: Reduce number of category fetches
Comment 3 Jonathan Druart 2022-06-01 08:10:58 UTC
Created attachment 135526 [details] [review]
Bug 30874: 2 more - need more investigation
Comment 4 Jonathan Druart 2022-06-01 08:11:02 UTC
Created attachment 135527 [details] [review]
Bug 30874: Simplify categories loop construction
Comment 5 Jonathan Druart 2022-06-01 08:12:29 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2022-06-01 08:29:34 UTC
Created attachment 135528 [details] [review]
Bug 30874: Simplify categories loop construction
Comment 7 Jonathan Druart 2022-06-01 08:29:39 UTC
Created attachment 135529 [details] [review]
Bug 30874: Remove category_type

In which case do we pass category_type to this script? Am I missing
something?
Comment 8 Jonathan Druart 2022-06-01 11:14:22 UTC
Fancy a code golf?
Comment 9 Katrin Fischer 2022-06-25 10:38:51 UTC
Looked at the first patches and it's obviously an improvement. I can't offer a lot of 'golfing', but maybe we could still get some improvements out of these patches?
Comment 10 Jonathan Druart 2022-07-29 16:12:44 UTC
ping? It would be a shame to lose this enhancement.
Comment 11 Jonathan Druart 2022-08-01 07:47:21 UTC
Created attachment 138443 [details] [review]
Bug 30874: Replace categoryname
Comment 12 Jonathan Druart 2022-08-01 07:47:26 UTC
Created attachment 138444 [details] [review]
Bug 30874: Reduce number of category fetches
Comment 13 Jonathan Druart 2022-08-01 07:47:30 UTC
Created attachment 138445 [details] [review]
Bug 30874: 2 more - need more investigation
Comment 14 Jonathan Druart 2022-08-01 07:47:34 UTC
Created attachment 138446 [details] [review]
Bug 30874: Simplify categories loop construction
Comment 15 Jonathan Druart 2022-08-01 07:47:39 UTC
Created attachment 138447 [details] [review]
Bug 30874: Remove category_type

In which case do we pass category_type to this script? Am I missing
something?
Comment 16 Jonathan Druart 2022-08-01 07:47:50 UTC
Test plan:
Create a new patron in a given category
=> Form show the dropdown with the selected category
Edit again
=> Value is kept

Edit a category to give it specific values for: messaging prefs, password strength/length, can be guarantee

Edit the patron, change the category, and confirm that the different limitation are correctly applied.
Comment 17 Victor Grousset/tuxayo 2022-08-03 19:15:44 UTC
Created attachment 138545 [details] [review]
Bug 30874: Replace categoryname

== Test plan ==
1. Apply all patches
2. Create a new patron in a given category
   => Form show the dropdown with the selected category
3. Edit again
   => Value is kept
4. Edit a category to give it specific values for: messaging prefs,
   password strength/length, can be guarantee
5. Edit the patron, change the category, and confirm that the different
   limitation are correctly applied.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 18 Victor Grousset/tuxayo 2022-08-03 19:15:53 UTC
Created attachment 138546 [details] [review]
Bug 30874: Reduce number of category fetches

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 19 Victor Grousset/tuxayo 2022-08-03 19:16:07 UTC
Created attachment 138547 [details] [review]
Bug 30874: 2 more - need more investigation

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 20 Victor Grousset/tuxayo 2022-08-03 19:16:15 UTC
Created attachment 138548 [details] [review]
Bug 30874: Simplify categories loop construction

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 21 Victor Grousset/tuxayo 2022-08-03 19:16:25 UTC
Created attachment 138549 [details] [review]
Bug 30874: Remove category_type

In which case do we pass category_type to this script? Am I missing
something?

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 22 Victor Grousset/tuxayo 2022-08-03 19:17:13 UTC
It works :)

Added test plan to 1st patch.
Comment 23 Marcel de Rooy 2022-08-05 06:14:02 UTC
QAing
Comment 24 Marcel de Rooy 2022-08-05 06:51:22 UTC
Created attachment 138637 [details] [review]
Bug 30874: Replace categoryname

== Test plan ==
1. Apply all patches
2. Create a new patron in a given category
   => Form show the dropdown with the selected category
3. Edit again
   => Value is kept
4. Edit a category to give it specific values for: messaging prefs,
   password strength/length, can be guarantee
5. Edit the patron, change the category, and confirm that the different
   limitation are correctly applied.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 25 Marcel de Rooy 2022-08-05 06:51:27 UTC
Created attachment 138638 [details] [review]
Bug 30874: Reduce number of category fetches

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 26 Marcel de Rooy 2022-08-05 06:51:31 UTC
Created attachment 138639 [details] [review]
Bug 30874: 2 more - need more investigation

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 27 Marcel de Rooy 2022-08-05 06:51:35 UTC
Created attachment 138640 [details] [review]
Bug 30874: Simplify categories loop construction

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 28 Marcel de Rooy 2022-08-05 06:51:39 UTC
Created attachment 138641 [details] [review]
Bug 30874: Remove category_type

In which case do we pass category_type to this script? Am I missing
something?

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 29 Tomás Cohen Arazi 2022-08-05 17:55:10 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 30 Lucas Gass 2022-09-29 17:13:25 UTC
Missing 22.05.x dependencies, no backport