Bug 37399 - Item type not displayed on holdings table if noItemTypeImages is disabled
Summary: Item type not displayed on holdings table if noItemTypeImages is disabled
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Emmi Takkinen
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on: 33568
Blocks:
  Show dependency treegraph
 
Reported: 2024-07-18 09:28 UTC by Emmi Takkinen
Modified: 2024-09-10 13:16 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the staff interface holdings table for a record so that the 'Item type' column is displayed when the "noItemTypeImages" system preference is set to 'Don't show'.
Version(s) released in:
24.11.00,24.05.04
Circulation function:


Attachments
Bug 37399: Fix showing itemtype on holdings table (2.23 KB, patch)
2024-07-18 09:37 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 37399: Fix showing itemtype on holdings table (2.29 KB, patch)
2024-07-18 16:49 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37399: Fix showing itemtype on holdings table (2.34 KB, patch)
2024-07-19 14:26 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emmi Takkinen 2024-07-18 09:28:09 UTC
If syspref "noItemTypeImages" is disabled, holdings table won't display itemtype column. 

To reproduce:
1. Enable syspref "noItemTypeImages".
2. Find biblio with items. 
=> Note that itemtype column is displayed on holdings table.
3. Disable syspref "noItemTypeImages".
=> Itemtype column is no longer displayed on holdings table.
Comment 1 Emmi Takkinen 2024-07-18 09:37:28 UTC
Created attachment 169126 [details] [review]
Bug 37399: Fix showing itemtype on holdings table

If syspref "noItemTypeImages" is disabled, holdings
table won't display itemtype column. This patch
fixes this.

To reproduce:
1. Enable syspref "noItemTypeImages".
2. Find biblio with items.
=> Note that itemtype column is displayed on holdings table.
3. Disable syspref "noItemTypeImages".
=> Itemtype column is no longer displayed on holdings table.
4. Apply this patch.
=> Now column should be displayed correctly.

Sponsored-by: Koha-Suomi Oy
Comment 2 Owen Leonard 2024-07-18 16:49:14 UTC
Created attachment 169150 [details] [review]
Bug 37399: Fix showing itemtype on holdings table

If syspref "noItemTypeImages" is disabled, holdings table won't display
itemtype column. This patch fixes this.

To reproduce:
1. Enable syspref "noItemTypeImages".
2. Find biblio with items.
   => Note that itemtype column is displayed on holdings table.
3. Disable syspref "noItemTypeImages".
   => Itemtype column is no longer displayed on holdings table.
4. Apply this patch.
   => Now column should be displayed correctly.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 David Nind 2024-07-18 21:00:56 UTC
I've changed the bug type to "normal" from "enhancement", as it is something that isn't working when it should.
Comment 4 Tomás Cohen Arazi (tcohen) 2024-07-19 14:26:04 UTC
Created attachment 169230 [details] [review]
Bug 37399: Fix showing itemtype on holdings table

If syspref "noItemTypeImages" is disabled, holdings table won't display
itemtype column. This patch fixes this.

To reproduce:
1. Enable syspref "noItemTypeImages".
2. Find biblio with items.
   => Note that itemtype column is displayed on holdings table.
3. Disable syspref "noItemTypeImages".
   => Itemtype column is no longer displayed on holdings table.
4. Apply this patch.
   => Now column should be displayed correctly.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Martin Renvoize (ashimema) 2024-07-22 09:41:04 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant
Comment 6 Aleisha Amohia 2024-07-31 00:43:31 UTC
This fixes a bug for the holdings table in the staff interface in 24.05.

If noItemTypeImages is disabled, we get the "Processing" box for a while, and in the console is an error: 

`Uncaught ReferenceError: item_type_description is not defined`

This patches moves the important line outside of the [% UNLESS %] block:

`let item_type_description = row._strings.item_type_id.str;`

so that item_type_description can be defined.

Please backport :)
Comment 7 Lucas Gass (lukeg) 2024-08-28 19:54:41 UTC
Backported to 24.05.x for upcoming 24.05.04
Comment 8 Fridolin Somers 2024-09-10 13:16:49 UTC
Depends on Bug 33568 not in 23.11.x