Bug 30517 loosens the regular expression used in the edit functionality of the circulation rules matrix in an attempt to make translations work.. However it has caused a regression for the case where a library may have similarly named patron categories (and likely also for item types). Our partner has the following valid patron categories: "Staff", "Staff (ISA)", "Staff (temporary)" and "Staff (zero entitlements)" With the regular expression change introduced in bug 30517, the first three categories all get reduced to just `staff` and as such you can no longer edit rules that contain those categories. We really shouldn't be relying on a regular expression here at all.. we should be able to pass in the codes rather than descriptions and utilise those for matching against.
Created attachment 153407 [details] [review] Bug 34269: Convert to using codes in select compares This patch updates the logic in smart rules to compare option values to codes as apposed to option texts to value descriptions.
Created attachment 153408 [details] [review] Bug 34269: Convert to using codes in select compares This patch updates the logic in smart rules to compare option values to codes as apposed to option texts to value descriptions.
Testing...
Created attachment 153456 [details] [review] Bug 34269: Convert to using codes in select compares This patch updates the logic in smart rules to compare option values to codes as apposed to option texts to value descriptions. 0. Apply patch 1. Install another language in the staff interface 1. ./translate install xx-XX 2. Check the box of the language in the 'language' system preference 3. Refresh 2. Create an item type with a parent 1. Go to Administration > Item types 2. Create a new item type or modify an existing one, assigning a parent type Example: Create a 'Children's books' itemtypetype and assig 'Books' as its parent 3. Create a third item type with the same description but something added in (): Example: 'Children's books (3-5)' 3. Create a circulation rule for the parent type Example: All/Books, with 2 checkouts allowed 4. Create a circulation rule for: All/All with 3 checkouts allowed 5. In English, click on "Edit" next to the parent type rule (All/Books) --> Note that the item type in the bottom row (the modifiable row) is changed to 'Books (All)' 6. Modify the number of checkouts allowed (e.g. 99) --> The All/Books rule is modified 7. Switch the interface to the other language 8. Click on "Edit" next to the parent type rule (All/Books) --> The All/Books rule is modified 9. Add rules for Children's books and Children's books (3-5) 10. Click on "Edit" next to each rule and change a value --> Verify that the changed values are always saved for the correct rule
Created attachment 153457 [details] [review] Bug 34269: (QA follow-up) Add missing TT filters
Conflict with bug 33028.
Created attachment 153985 [details] [review] Bug 34269: Convert to using codes in select compares This patch updates the logic in smart rules to compare option values to codes as apposed to option texts to value descriptions. 0. Apply patch 1. Install another language in the staff interface 1. ./translate install xx-XX 2. Check the box of the language in the 'language' system preference 3. Refresh 2. Create an item type with a parent 1. Go to Administration > Item types 2. Create a new item type or modify an existing one, assigning a parent type Example: Create a 'Children's books' itemtypetype and assig 'Books' as its parent 3. Create a third item type with the same description but something added in (): Example: 'Children's books (3-5)' 3. Create a circulation rule for the parent type Example: All/Books, with 2 checkouts allowed 4. Create a circulation rule for: All/All with 3 checkouts allowed 5. In English, click on "Edit" next to the parent type rule (All/Books) --> Note that the item type in the bottom row (the modifiable row) is changed to 'Books (All)' 6. Modify the number of checkouts allowed (e.g. 99) --> The All/Books rule is modified 7. Switch the interface to the other language 8. Click on "Edit" next to the parent type rule (All/Books) --> The All/Books rule is modified 9. Add rules for Children's books and Children's books (3-5) 10. Click on "Edit" next to each rule and change a value --> Verify that the changed values are always saved for the correct rule
Created attachment 153986 [details] [review] Bug 34269: (QA follow-up) Add missing TT filters
Created attachment 153987 [details] [review] Bug 34269: Convert to using codes in select compares This patch updates the logic in smart rules to compare option values to codes as apposed to option texts to value descriptions. 0. Apply patch 1. Install another language in the staff interface 1. ./translate install xx-XX 2. Check the box of the language in the 'language' system preference 3. Refresh 2. Create an item type with a parent 1. Go to Administration > Item types 2. Create a new item type or modify an existing one, assigning a parent type Example: Create a 'Children's books' itemtypetype and assig 'Books' as its parent 3. Create a third item type with the same description but something added in (): Example: 'Children's books (3-5)' 3. Create a circulation rule for the parent type Example: All/Books, with 2 checkouts allowed 4. Create a circulation rule for: All/All with 3 checkouts allowed 5. In English, click on "Edit" next to the parent type rule (All/Books) --> Note that the item type in the bottom row (the modifiable row) is changed to 'Books (All)' 6. Modify the number of checkouts allowed (e.g. 99) --> The All/Books rule is modified 7. Switch the interface to the other language 8. Click on "Edit" next to the parent type rule (All/Books) --> The All/Books rule is modified 9. Add rules for Children's books and Children's books (3-5) 10. Click on "Edit" next to each rule and change a value --> Verify that the changed values are always saved for the correct rule
Created attachment 153988 [details] [review] Bug 34269: (QA follow-up) Add missing TT filters
Looks like my SO lines here are missing - I'll fix.
Created attachment 154074 [details] [review] Bug 34269: Convert to using codes in select compares This patch updates the logic in smart rules to compare option values to codes as apposed to option texts to value descriptions. 0. Apply patch 1. Install another language in the staff interface 1. ./translate install xx-XX 2. Check the box of the language in the 'language' system preference 3. Refresh 2. Create an item type with a parent 1. Go to Administration > Item types 2. Create a new item type or modify an existing one, assigning a parent type Example: Create a 'Children's books' itemtypetype and assig 'Books' as its parent 3. Create a third item type with the same description but something added in (): Example: 'Children's books (3-5)' 3. Create a circulation rule for the parent type Example: All/Books, with 2 checkouts allowed 4. Create a circulation rule for: All/All with 3 checkouts allowed 5. In English, click on "Edit" next to the parent type rule (All/Books) --> Note that the item type in the bottom row (the modifiable row) is changed to 'Books (All)' 6. Modify the number of checkouts allowed (e.g. 99) --> The All/Books rule is modified 7. Switch the interface to the other language 8. Click on "Edit" next to the parent type rule (All/Books) --> The All/Books rule is modified 9. Add rules for Children's books and Children's books (3-5) 10. Click on "Edit" next to each rule and change a value --> Verify that the changed values are always saved for the correct rule Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 154075 [details] [review] Bug 34269: (QA follow-up) Add missing TT filters Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Processing files before patches File not found : css/staff-global.css at /usr/share/koha/Koha/Template/Plugin/Asset.pm line 107. Processing files after patches File not found : css/staff-global.css at /usr/share/koha/Koha/Template/Plugin/Asset.pm line 107. Please explain.
(In reply to Marcel de Rooy from comment #14) > Processing files before patches > File not found : css/staff-global.css at > /usr/share/koha/Koha/Template/Plugin/Asset.pm line 107. > > Processing files after patches > File not found : css/staff-global.css at > /usr/share/koha/Koha/Template/Plugin/Asset.pm line 107. > > > Please explain. Hmm. Dont bother. I ran build resources again ;)
Created attachment 154255 [details] [review] Bug 34269: Convert to using codes in select compares This patch updates the logic in smart rules to compare option values to codes as apposed to option texts to value descriptions. 0. Apply patch 1. Install another language in the staff interface 1. ./translate install xx-XX 2. Check the box of the language in the 'language' system preference 3. Refresh 2. Create an item type with a parent 1. Go to Administration > Item types 2. Create a new item type or modify an existing one, assigning a parent type Example: Create a 'Children's books' itemtypetype and assig 'Books' as its parent 3. Create a third item type with the same description but something added in (): Example: 'Children's books (3-5)' 3. Create a circulation rule for the parent type Example: All/Books, with 2 checkouts allowed 4. Create a circulation rule for: All/All with 3 checkouts allowed 5. In English, click on "Edit" next to the parent type rule (All/Books) --> Note that the item type in the bottom row (the modifiable row) is changed to 'Books (All)' 6. Modify the number of checkouts allowed (e.g. 99) --> The All/Books rule is modified 7. Switch the interface to the other language 8. Click on "Edit" next to the parent type rule (All/Books) --> The All/Books rule is modified 9. Add rules for Children's books and Children's books (3-5) 10. Click on "Edit" next to each rule and change a value --> Verify that the changed values are always saved for the correct rule Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 154256 [details] [review] Bug 34269: (QA follow-up) Add missing TT filters Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.03
<td data-code="[%- IF auto_renew -%]yes[%- ELSE -%]no[%- END -%]"> Lets hope this does not appear in translation files.
Nice work everyone! Pushed to 22.11.x for next release