Bug 20238 - Show description of ITEMTYPECAT instead of code in itemtypes summary table
Summary: Show description of ITEMTYPECAT instead of code in itemtypes summary table
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Target Milestone: ---
Assignee: Ethan
QA Contact: Testopia
URL:
Whiteboard:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2018-02-18 10:58 UTC by Katrin Fischer
Modified: 2019-02-10 13:01 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 20238: Description of ITEMTYPECAT now shows on itemtypes summary table (13.08 KB, patch)
2019-01-17 01:54 UTC, Ethan
Details | Diff | Splinter Review
Bug 20238: Description of ITEMTYPECAT now shows on itemtypes summary table (12.94 KB, patch)
2019-01-17 20:28 UTC, Ethan
Details | Diff | Splinter Review
Bug 20238: Description of ITEMTYPECAT now shows on itemtypes summary table (12.98 KB, patch)
2019-01-18 21:35 UTC, Pierre-Marc Thibault
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2018-02-18 10:58:01 UTC
When working with grouped item types using ITEMTYPECAT authorised values, looking at the item types table, it shows the code, not the description. On editing an item type, we show the description - so there is some confusing mismatch there. Both should show the description.

To check:
- Add a value to the ITEMTYPECAT authorised value category
- Edit an item type and pick that value as search category
- Save
- Verify the code shows up in the table, but not the description
Comment 1 Katrin Fischer 2018-02-18 10:59:18 UTC
Can probably be fixed using a TT plugin.
Comment 2 Ethan 2019-01-17 01:54:59 UTC
Created attachment 84112 [details] [review]
Bug 20238: Description of ITEMTYPECAT now shows on itemtypes summary table

Test plan:
1. From homepage, go to Koha Amdinistration
2. Go to Authorised Values
3. Scroll down to ITEMTYPECAT and click Add
4. Give the new authorised value an Authorised value and Description
5. Save it
6. On the left, go to Item types
7. Click Edit on an item type
8. Under Search Catergory, select the new authorised value you just
created. It should appear in the dropdown as it's description
9. Click Save changes
10. Under Search category for the item type you just edited, you should see your new authorised values' description
Comment 3 Owen Leonard 2019-01-17 12:56:10 UTC
This patch works well, but I think Katrin's suggestion is the more efficient solution. There's a shortcut for getting the description of authorised values. The template already has [% USE AuthorisedValues %] included, so we know the plugin is already being loaded for use:

[% AuthorisedValues.GetByCode( 'ITEMTYPECAT', itemtype.searchcategory ) | html %]
Comment 4 Ethan 2019-01-17 20:28:23 UTC
Created attachment 84158 [details] [review]
Bug 20238: Description of ITEMTYPECAT now shows on itemtypes summary table

Test plan:
1. From homepage, go to Koha Amdinistration
2. Go to Authorised Values
3. Scroll down to ITEMTYPECAT and click Add
4. Give the new authorised value an Authorised value and Description
5. Save it
6. On the left, go to Item types
7. Click Edit on an item type
8. Under Search Catergory, select the new authorised value you just
created. It should appear in the dropdown as it's description
9. Click Save changes
10. Under Search category for the item type you just edited, you should see your new authorised values' description
Comment 5 Pierre-Marc Thibault 2019-01-18 21:35:35 UTC
Created attachment 84226 [details] [review]
Bug 20238: Description of ITEMTYPECAT now shows on itemtypes summary table

Test plan:
1. From homepage, go to Koha Amdinistration
2. Go to Authorised Values
3. Scroll down to ITEMTYPECAT and click Add
4. Give the new authorised value an Authorised value and Description
5. Save it
6. On the left, go to Item types
7. Click Edit on an item type
8. Under Search Catergory, select the new authorised value you just
created. It should appear in the dropdown as it's description
9. Click Save changes
10. Under Search category for the item type you just edited, you should see your new authorised values' description

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Comment 6 Katrin Fischer 2019-01-19 22:49:30 UTC
I am sorry, but there are some things wrong with this patch:

1) If you take a look at the changes commited, you can see it includs a lot of unintentional changes:

---
 Koha/Illbackends/BLDSS                                  |   1 +
 Koha/Illbackends/koha-ill-freeform                      |   1 +
 admin/itemtypes.pl                                      |   2 ++
 koha-ill-freeform                                       |   1 +
 .../prog/en/modules/admin/.itemtypes.tt.swp             | Bin 0 -> 40960 bytes
 .../intranet-tmpl/prog/en/modules/admin/itemtypes.tt    |   4 +++-
 6 files changed, 8 insertions(+), 1 deletion(-)
 create mode 160000 Koha/Illbackends/BLDSS
 create mode 160000 Koha/Illbackends/koha-ill-freeform
 create mode 160000 koha-ill-freeform
 create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/.itemtypes.tt.swp

2) Using the TT plugin on the template side, the changes to admin/itemtypes.pl are no longer needed.
Comment 7 Katrin Fischer 2019-02-10 13:01:10 UTC
This would be a nice one to save!