Created attachment 45609 [details] default hold policies See attached. The data is in the database, but the item type is not showing. I'm not sure if this is just my system or if it's all systems.
Created attachment 45632 [details] [review] Bug 15354: Fix translted itemtype description In bug 14100, the admin/smart-rules.pl needed much more love. Indeed, the translated_description string should be used everywhere and replaced the previous 'humanitemtype'. Test plan: 1/ Translate some item types. 2/ Define some holds policy using these item types. 3/ Update the template strings 4/ Confirm that the "holds policy by item type" are displayed (for the default and specific library) and sorted by translated item type descriptions.
Created attachment 45633 [details] [review] Bug 15354: Fix translated itemtype descriptions in circ rules In bug 14100, the admin/smart-rules.pl needed much more love. Indeed, the translated_description string should be used everywhere and replaced the previous 'humanitemtype'. Test plan: 1/ Translate some item types. 2/ Define some holds policy using these item types. 3/ Update the template strings 4/ Confirm that the "holds policy by item type" are displayed (for the default and specific library) and sorted by translated item type descriptions.
Created attachment 45716 [details] [review] Bug 15354: Fix translated itemtype descriptions in circ rules In bug 14100, the admin/smart-rules.pl needed much more love. Indeed, the translated_description string should be used everywhere and replaced the previous 'humanitemtype'. Test plan: 1/ Translate some item types. 2/ Define some holds policy using these item types. 3/ Update the template strings 4/ Confirm that the "holds policy by item type" are displayed (for the default and specific library) and sorted by translated item type descriptions. Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Minor whitespace issues: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt FAIL forbidden patterns forbidden pattern: tab char (line 188) SKIP spelling OK tt_valid OK valid_template (These aren't really your fault; I put a patch to fix all this mess on bug 15456 that you can rebase onto if you'd prefer.) More importantly, though, I noticed that while the item type descriptions now correctly show, and the list of rules is sorted by the translated description, the item type selection dropdown is not sorted by the translated description.
Created attachment 46222 [details] [review] Bug 15354: Sort itemtypes by translated description everywhere on circ rules admin page It's better to cmp on lc.
(In reply to Jesse Weaver from comment #4) > Minor whitespace issues: > > FAIL koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt > FAIL forbidden patterns > forbidden pattern: tab char (line 188) > SKIP spelling > OK tt_valid > OK valid_template > > (These aren't really your fault; I put a patch to fix all this mess on bug > 15456 that you can rebase onto if you'd prefer.) I think it should be fixed asap and not depend on something else to ease a possible backport. > More importantly, though, I noticed that while the item type descriptions > now correctly show, and the list of rules is sorted by the translated > description, the item type selection dropdown is not sorted by the > translated description. Good catch. I have fixed it. Not that C4::Koha::GetItemTypes should be fixed for a global fix. It will be easy to do on top of bug 14828.
(In reply to Jonathan Druart from comment #6) > Not that C4::Koha::GetItemTypes should be fixed for a global fix. > It will be easy to do on top of bug 14828. Finally done on bug 15337
Created attachment 46281 [details] [review] Bug 15354: Fix translated itemtype descriptions in circ rules In bug 14100, the admin/smart-rules.pl needed much more love. Indeed, the translated_description string should be used everywhere and replaced the previous 'humanitemtype'. Test plan: 1/ Translate some item types. 2/ Define some holds policy using these item types. 3/ Update the template strings 4/ Confirm that the "holds policy by item type" are displayed (for the default and specific library) and sorted by translated item type descriptions. Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Passes QA tools.
Created attachment 46282 [details] [review] Bug 15354: Sort itemtypes by translated description everywhere on circ rules admin page It's better to cmp on lc. Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Passes QA tools. Fixes sorting of dropdown for translated itemtype descriptions.
Created attachment 46283 [details] [review] Bug 15354: (QA followup) remove tab character Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Created attachment 46949 [details] [review] [PASSED QA] Bug 15354: Fix translated itemtype descriptions in circ rules In bug 14100, the admin/smart-rules.pl needed much more love. Indeed, the translated_description string should be used everywhere and replaced the previous 'humanitemtype'. Test plan: 1/ Translate some item types. 2/ Define some holds policy using these item types. 3/ Update the template strings 4/ Confirm that the "holds policy by item type" are displayed (for the default and specific library) and sorted by translated item type descriptions. Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Passes QA tools. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 46950 [details] [review] [PASSED QA] Bug 15354: Sort itemtypes by translated description everywhere on circ rules admin page It's better to cmp on lc. Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Passes QA tools. Fixes sorting of dropdown for translated itemtype descriptions. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 46951 [details] [review] [PASSED QA] Bug 15354: (QA followup) remove tab character Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master (after Cait added her QA stamp). Thanks for the work!
Patches pushed to 3.22.x, will be in 3.22.2