Bug 31117

Summary: Cloning standard circulation rules for all libraries show up as from '*'
Product: Koha Reporter: Florian <florian.bontemps>
Component: System AdministrationAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: arthur.suzuki, e.betemps, gmcharlt, lucas, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.04, 21.11.11
Circulation function:
Attachments: Picture for exemple
Bug 31117: New message for cloning standard rules
Bug 31117: New message for cloning standard rules
Bug 31117: New message for cloning standard rules

Description Florian 2022-07-07 15:22:28 UTC
Created attachment 137327 [details]
Picture for exemple

When cloning circulation and fine rules using the "Standard rules for all libraries" default option to another library, the confirmation title after wards shows up as :

Cloning circulation and fine rules from "" to "Centerville"

Because the default option has no real label, it doesn't show up. This doesn't affect the cloning feature, this is purely an text issue. You can see an exemple on the attached picture.
Comment 1 Florian 2022-07-07 15:35:39 UTC
Created attachment 137328 [details] [review]
Bug 31117: New message for cloning standard rules

This commit adds a different message when cloning circulation and fine rules if you use the Standard rules for all libraries option.

Test plan :
1. Go to the Circulation and fine rules page in the Admin tab.
2. Check that the 'Select a library' menu is on 'Standard rules for all libraries'.
3. Check that you also have some random rules to clone, or create some.
4. Clone these rules to the library of your choice.
5. Confirm that the message 'Clone circulation and fine rules from "" to (library of your choice)' appears.
6. Now clone rules from a specific library to another one, and repeat steps 3-4.
7. Confirm that this time, the message will displays both libraries properly.
8. Apply patch.
9. Repeat steps 2 to 4 and 6 to 7. Confirm that this time, the message in the first case will be 'Cloning circulation and fine rules to "(library of your choice)"'.
10. Kindly sign off.
Comment 2 Biblibre Sandboxes 2022-07-07 16:22:55 UTC
Created attachment 137329 [details] [review]
Bug 31117: New message for cloning standard rules

This commit adds a different message when cloning circulation and fine rules if you use the Standard rules for all libraries option.

Test plan :
1. Go to the Circulation and fine rules page in the Admin tab.
2. Check that the 'Select a library' menu is on 'Standard rules for all libraries'.
3. Check that you also have some random rules to clone, or create some.
4. Clone these rules to the library of your choice.
5. Confirm that the message 'Clone circulation and fine rules from "" to (library of your choice)' appears.
6. Now clone rules from a specific library to another one, and repeat steps 3-4.
7. Confirm that this time, the message will displays both libraries properly.
8. Apply patch.
9. Repeat steps 2 to 4 and 6 to 7. Confirm that this time, the message in the first case will be 'Cloning circulation and fine rules to "(library of your choice)"'.
10. Kindly sign off.

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Comment 3 Emmanuel Bétemps 2022-07-07 16:26:31 UTC
Actually, the message for the 1st case AFTER applying the patch is : Cloning circulation and fine rules from standard rules to "(library of your choice)"

Your testplan says : Cloning circulation and fine rules to "(library of your choice)"

But I think the typo is in the test plan because the sentence displayed (when patch applies) really fits.
Comment 4 Katrin Fischer 2022-07-08 11:19:01 UTC
Hi Emmanuel, I think you are right, the sentence fits, we don't need to have the exact same wording.
Comment 5 Katrin Fischer 2022-07-08 11:19:57 UTC
Created attachment 137404 [details] [review]
Bug 31117: New message for cloning standard rules

This commit adds a different message when cloning circulation and fine rules if you use the Standard rules for all libraries option.

Test plan :
1. Go to the Circulation and fine rules page in the Admin tab.
2. Check that the 'Select a library' menu is on 'Standard rules for all libraries'.
3. Check that you also have some random rules to clone, or create some.
4. Clone these rules to the library of your choice.
5. Confirm that the message 'Clone circulation and fine rules from "" to (library of your choice)' appears.
6. Now clone rules from a specific library to another one, and repeat steps 3-4.
7. Confirm that this time, the message will displays both libraries properly.
8. Apply patch.
9. Repeat steps 2 to 4 and 6 to 7. Confirm that this time, the message in the first case will be 'Cloning circulation and fine rules to "(library of your choice)"'.
10. Kindly sign off.

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 6 Tomás Cohen Arazi (tcohen) 2022-07-08 18:26:44 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Lucas Gass (lukeg) 2022-08-12 16:51:11 UTC
Backported to 22.05.x for 22.05.04
Comment 8 Arthur Suzuki 2022-08-16 12:59:03 UTC
Salut Florian,
Bravo pour ce patch, il rejoint la 21.11 en version 21.11.11!

backported to 21.11.x for 21.11.11

thx!
Comment 9 Victor Grousset/tuxayo 2022-08-19 23:12:54 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.