Bug 15354 - item types aren't showing in default hold policies
Summary: item types aren't showing in default hold policies
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 14100
Blocks: 15755
  Show dependency treegraph
 
Reported: 2015-12-11 14:31 UTC by Nicole C. Engard
Modified: 2017-06-14 22:05 UTC (History)
4 users (show)

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


Attachments
default hold policies (68.80 KB, image/png)
2015-12-11 14:31 UTC, Nicole C. Engard
Details
Bug 15354: Fix translted itemtype description (5.21 KB, patch)
2015-12-14 10:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15354: Fix translated itemtype descriptions in circ rules (5.22 KB, patch)
2015-12-14 10:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15354: Fix translated itemtype descriptions in circ rules (5.37 KB, patch)
2015-12-16 06:59 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 15354: Sort itemtypes by translated description everywhere on circ rules admin page (1.63 KB, patch)
2016-01-04 10:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15354: Fix translated itemtype descriptions in circ rules (5.44 KB, patch)
2016-01-05 20:45 UTC, Jesse Weaver
Details | Diff | Splinter Review
Bug 15354: Sort itemtypes by translated description everywhere on circ rules admin page (1.77 KB, patch)
2016-01-05 20:45 UTC, Jesse Weaver
Details | Diff | Splinter Review
Bug 15354: (QA followup) remove tab character (1.08 KB, patch)
2016-01-05 20:45 UTC, Jesse Weaver
Details | Diff | Splinter Review
[PASSED QA] Bug 15354: Fix translated itemtype descriptions in circ rules (5.51 KB, patch)
2016-01-19 22:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 15354: Sort itemtypes by translated description everywhere on circ rules admin page (1.83 KB, patch)
2016-01-19 22:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 15354: (QA followup) remove tab character (1.15 KB, patch)
2016-01-19 22:27 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2015-12-11 14:31:48 UTC
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.
Comment 1 Jonathan Druart 2015-12-14 10:19:13 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2015-12-14 10:20:35 UTC Comment hidden (obsolete)
Comment 3 Frédéric Demians 2015-12-16 06:59:46 UTC Comment hidden (obsolete)
Comment 4 Jesse Weaver 2015-12-31 19:55:32 UTC
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.
Comment 5 Jonathan Druart 2016-01-04 10:03:23 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2016-01-04 10:05:56 UTC
(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.
Comment 7 Jonathan Druart 2016-01-05 14:30:01 UTC
(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
Comment 8 Jesse Weaver 2016-01-05 20:45:40 UTC Comment hidden (obsolete)
Comment 9 Jesse Weaver 2016-01-05 20:45:44 UTC Comment hidden (obsolete)
Comment 10 Jesse Weaver 2016-01-05 20:45:50 UTC Comment hidden (obsolete)
Comment 11 Katrin Fischer 2016-01-19 22:27:35 UTC
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>
Comment 12 Katrin Fischer 2016-01-19 22:27:38 UTC
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>
Comment 13 Katrin Fischer 2016-01-19 22:27:41 UTC
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>
Comment 14 Jesse Weaver 2016-01-19 22:39:37 UTC
Pushed to master (after Cait added her QA stamp). Thanks for the work!
Comment 15 Julian Maurice 2016-01-25 11:55:45 UTC
Patches pushed to 3.22.x, will be in 3.22.2