Bug 30874 - Simplify patron category handling in memberentry
Summary: Simplify patron category handling in memberentry
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 12446
Blocks:
  Show dependency treegraph
 
Reported: 2022-06-01 08:08 UTC by Jonathan Druart
Modified: 2022-08-05 17:55 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 30874: Replace categoryname (3.01 KB, patch)
2022-06-01 08:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30874: Reduce number of category fetches (3.13 KB, patch)
2022-06-01 08:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30874: 2 more - need more investigation (1.54 KB, patch)
2022-06-01 08:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30874: Simplify categories loop construction (8.57 KB, patch)
2022-06-01 08:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30874: Simplify categories loop construction (8.56 KB, patch)
2022-06-01 08:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30874: Remove category_type (9.95 KB, patch)
2022-06-01 08:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30874: Replace categoryname (3.04 KB, patch)
2022-08-01 07:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30874: Reduce number of category fetches (3.13 KB, patch)
2022-08-01 07:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30874: 2 more - need more investigation (1.54 KB, patch)
2022-08-01 07:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30874: Simplify categories loop construction (8.54 KB, patch)
2022-08-01 07:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30874: Remove category_type (10.04 KB, patch)
2022-08-01 07:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30874: Replace categoryname (3.47 KB, patch)
2022-08-03 19:15 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 30874: Reduce number of category fetches (3.18 KB, patch)
2022-08-03 19:15 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 30874: 2 more - need more investigation (1.60 KB, patch)
2022-08-03 19:16 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 30874: Simplify categories loop construction (8.59 KB, patch)
2022-08-03 19:16 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 30874: Remove category_type (10.09 KB, patch)
2022-08-03 19:16 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 30874: Replace categoryname (3.57 KB, patch)
2022-08-05 06:51 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30874: Reduce number of category fetches (3.28 KB, patch)
2022-08-05 06:51 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30874: 2 more - need more investigation (1.70 KB, patch)
2022-08-05 06:51 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30874: Simplify categories loop construction (8.68 KB, patch)
2022-08-05 06:51 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30874: Remove category_type (10.19 KB, patch)
2022-08-05 06:51 UTC, Marcel de Rooy
Details | Diff | Splinter Review

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