Bug 21090

Summary: Description of itemtype group doesn't show when there is an itemtype with the same code
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: jonathan.druart
Version: 17.11   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Katrin Fischer 2018-07-19 07:56:35 UTC
When an ITEMTYPECAT is using the same code as an itemtype, the description is not showing on the advanced search in OPAC.

To test:
- Create an itemtype BK
- Create an ITEMTYPECAT BK
- Link 2 itemtypes to this search category
- Verify the description is not showing up on advanced search in the OPAC
Comment 1 Jonathan Druart 2018-07-19 12:36:41 UTC
Hum, looks ok for me.
Comment 2 Owen Leonard 2018-07-19 13:29:11 UTC
Is the ITEMTYPECAT choice supposed to replace all the individual item types it contains?

Is ITEMTYPECAT supposed to work in the staff client?
Comment 3 Katrin Fischer 2018-07-19 14:29:19 UTC
Hi Owen,

- yes, you are not supposed to see the other itemtypes, only the group
- no, staff should still display them all

We saw this on 17.11 - had no time to retest on master yet :(
Comment 4 Katrin Fischer 2018-08-01 22:06:03 UTC
I can't reproduce the issue on master. So far only confirmed for 17.11.
Comment 5 Jonathan Druart 2018-08-13 19:23:13 UTC
Still ok here.


% git checkout v17.11.08

% sudo koha-mysql kohadev

MariaDB [koha_kohadev]> select * from authorised_values where authorised_value="BK";
+-----+-------------+------------------+---------+----------+----------+
| id  | category    | authorised_value | lib     | lib_opac | imageurl |
+-----+-------------+------------------+---------+----------+----------+
| 398 | ITEMTYPECAT | BK               | desc BK | desc BK  |          |
+-----+-------------+------------------+---------+----------+----------+
1 row in set (0.01 sec)

MariaDB [koha_kohadev]> select itemtype, description from itemtypes where searchcategory="BK";
+----------+----------------+
| itemtype | description    |
+----------+----------------+
| BK       | Books          |
| CF       | Computer Files |
+----------+----------------+
2 rows in set (0.00 sec)


https://snag.gy/pG5ygm.jpg
Comment 6 Katrin Fischer 2019-02-10 12:58:29 UTC
*** Bug 17212 has been marked as a duplicate of this bug. ***
Comment 7 Katrin Fischer 2019-02-10 12:58:38 UTC
*** Bug 18944 has been marked as a duplicate of this bug. ***
Comment 8 Katrin Fischer 2019-02-10 13:03:38 UTC
I can confirm it works correctly on master now.

But: It doesn't use the staff description if there is no OPAC description. That's why it appears empty too in some cases. I filed a new bug:

Bug 22302 - ITEMTYPECAT description doesn't fall back to description if OPAC description is empty