Bug 30234 - Serial local covers don't appear in the staff interface for other libraries with SeparateHoldings
Summary: Serial local covers don't appear in the staff interface for other libraries w...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 30792 (view as bug list)
Depends on: 26145
Blocks: 30976 30972
  Show dependency treegraph
 
Reported: 2022-03-05 12:43 UTC by Manos PETRIDIS
Modified: 2022-07-14 19:39 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the display of item-specific local cover images in the staff interface. Before this, item images were not shown for holdings on the record's details view page.
Version(s) released in:
22.11.00, 22.05.01, 21.11.10, 21.05.17


Attachments
Administrative view. (213.83 KB, image/png)
2022-03-05 12:43 UTC, Manos PETRIDIS
Details
OPAC view (262.78 KB, image/png)
2022-03-05 12:44 UTC, Manos PETRIDIS
Details
Columns available in administrative interface. (29.68 KB, image/png)
2022-03-05 12:45 UTC, Manos PETRIDIS
Details
Search preferences (75.73 KB, image/png)
2022-03-05 12:46 UTC, Manos PETRIDIS
Details
Serials preferences (50.66 KB, image/png)
2022-03-05 12:47 UTC, Manos PETRIDIS
Details
Cover preferences (25.39 KB, image/png)
2022-03-05 12:48 UTC, Manos PETRIDIS
Details
Newer biblios don't display any items' images in the administrative interface. (251.61 KB, image/png)
2022-03-06 20:07 UTC, Manos PETRIDIS
Details
Newer biblios do display all items' images in OPAC. (249.96 KB, image/png)
2022-03-06 20:08 UTC, Manos PETRIDIS
Details
Older biblios display all items' images in the administrative interface, even those I added today. (274.83 KB, image/png)
2022-03-06 20:09 UTC, Manos PETRIDIS
Details
Bug 30234: Fix local cover image display for other holdings (1.85 KB, patch)
2022-03-07 10:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30234: Fix local cover image display for other holdings (1.85 KB, patch)
2022-06-16 10:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30234: Fix local cover image display for other holdings (1.89 KB, patch)
2022-06-16 12:10 UTC, David Nind
Details | Diff | Splinter Review
Bug 30234: Fix local cover image display for other holdings (1.95 KB, patch)
2022-06-18 21:14 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 Manos PETRIDIS 2022-03-05 12:43:27 UTC
Created attachment 131397 [details]
Administrative view.

I'm running koha v21.11.03.000 and I've noticed that serial covers no longer appear in the administrative interface. They do appear in OPAC nevertheless.
Comment 1 Manos PETRIDIS 2022-03-05 12:44:11 UTC
Created attachment 131398 [details]
OPAC view
Comment 2 Manos PETRIDIS 2022-03-05 12:45:39 UTC
Created attachment 131399 [details]
Columns available in administrative interface.
Comment 3 Manos PETRIDIS 2022-03-05 12:46:34 UTC
Created attachment 131400 [details]
Search preferences
Comment 4 Manos PETRIDIS 2022-03-05 12:47:17 UTC
Created attachment 131401 [details]
Serials preferences
Comment 5 Manos PETRIDIS 2022-03-05 12:48:35 UTC
Created attachment 131402 [details]
Cover preferences
Comment 6 Manos PETRIDIS 2022-03-06 09:46:52 UTC
Must clarify that older local cover images do appear. Same goes for new images added to new items/issues of older records/serials.
Comment 7 Katrin Fischer 2022-03-06 11:34:38 UTC
You don't give information of where you pull the images from. 

On item level we can only display local covers, but your screenshot of the system preferences shows that you have turned that feature off?
Comment 8 Manos PETRIDIS 2022-03-06 20:06:46 UTC
(In reply to Katrin Fischer from comment #7)
> You don't give information of where you pull the images from. 
> 
> On item level we can only display local covers, but your screenshot of the
> system preferences shows that you have turned that feature off?

Images are from the same server that exhibits this  problem.

Please note that in 'Cover preferences' attachment both LocalCoverImages and OPACLocalCoverImages are set to Display. i.e. they're enabled. Otherwhise no local cover images would be displayed at all.

Please also note that:
* Older biblios display all items' images in the administrative interface, even those I added today.  Note biblionumber 642 in '202203_642_Admin'
* Newer biblios don't display any items' images in the administrative interface. Note biblionumber 1234 in '202203_NatGeo_Admin'
* Newer biblios do display all items' images in OPAC. Note biblionumber 1234 for example in '202203_NatGeo_OPAC'
Comment 9 Manos PETRIDIS 2022-03-06 20:07:53 UTC
Created attachment 131418 [details]
Newer biblios don't display any items' images in the administrative interface.
Comment 10 Manos PETRIDIS 2022-03-06 20:08:26 UTC
Created attachment 131419 [details]
Newer biblios do display all items' images in OPAC.
Comment 11 Manos PETRIDIS 2022-03-06 20:09:05 UTC
Created attachment 131420 [details]
Older biblios display all items' images in the administrative interface, even those I added today.
Comment 12 Jonathan Druart 2022-03-07 08:50:30 UTC
Using v21.11.03:
0. turned the prefs on
1. created a new bibliographic record
2. attached a cover image to the bib record
3. created a new item
4. attached a cover image to the item

=> I see the cover images on the staff interface.

Do you see an error in the console?
Please try to recreate the problem on a sandbox and provide us the different steps.
Comment 13 Manos PETRIDIS 2022-03-07 09:58:33 UTC
(In reply to Jonathan Druart from comment #12)
> Using v21.11.03:
> 0. turned the prefs on
> 1. created a new bibliographic record
> 2. attached a cover image to the bib record
> 3. created a new item
> 4. attached a cover image to the item
> 
> => I see the cover images on the staff interface.
> 
> Do you see an error in the console?
> Please try to recreate the problem on a sandbox and provide us the different
> steps.

No errors in the browser console.
How might I load my library's backup to a sandbox? The issue does not always appear, therefore any new additions might not bring it to the surface. 

Menawhile however, I've discovered what the issue is: Local covers are displayed in the administrative interface only for the items set as having home library the one selected by the user upon entry / set my the user using the selector in the upper right corner.
Comment 14 Jonathan Druart 2022-03-07 10:23:50 UTC
ok, I recreate now, with SeparateHoldings. It seems broken since attaching a cover images to items is possible.
Comment 15 Jonathan Druart 2022-03-07 10:37:11 UTC
Created attachment 131430 [details] [review]
Bug 30234: Fix local cover image display for other holdings

Bug 26145 added the ability to add local cover images to items.
If SeparateHoldings is set, items from other libraries are displayed in
a separate tab, and not considered as visible. We have a JS test to
assume that images not shown are not present, this only apply for the
images for the bibliographic record, as they can come from different
sources.

Test plan:
Turn on LocalCoverImages and SeparateHoldings
Create a record with different items coming from different libraries
Attach images to items and to the biblio
Notice that with this patch you can see the images from the "Other
holdings" tab
Comment 16 Jonathan Druart 2022-03-07 10:37:50 UTC
Hum I found a bug but it's not exactly what you are describing. Can you try the patch and see if it fixes your problem?
Comment 17 Manos PETRIDIS 2022-03-07 11:44:44 UTC
(In reply to Jonathan Druart from comment #16)
> Hum I found a bug but it's not exactly what you are describing. Can you try
> the patch and see if it fixes your problem?

My installation is a packages one, but I can verify that by updating file
/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/modules/catalogue/detail.tt
issue has been resolved. 

I notice that there are several similar files, for different interface languages, for example
/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/el-GR/modules/catalogue/detail.tt


These files be automatically updated I suppose once the fix reaches some future release. 

MP
Comment 18 Lucas Gass 2022-06-02 19:47:32 UTC
(In reply to Jonathan Druart from comment #16)
> Hum I found a bug but it's not exactly what you are describing. Can you try
> the patch and see if it fixes your problem?

Jonathan, your fix seems similar to the problem describe in Bug 30792. Do you think these are duplicate issues?
Comment 19 Jonathan Druart 2022-06-08 12:36:58 UTC
(In reply to Lucas Gass from comment #18)
> (In reply to Jonathan Druart from comment #16)
> > Hum I found a bug but it's not exactly what you are describing. Can you try
> > the patch and see if it fixes your problem?
> 
> Jonathan, your fix seems similar to the problem describe in Bug 30792. Do
> you think these are duplicate issues?

Looks like, yes.
Comment 20 Jonathan Druart 2022-06-08 12:37:07 UTC
*** Bug 30792 has been marked as a duplicate of this bug. ***
Comment 21 Jonathan Druart 2022-06-16 10:10:17 UTC
Created attachment 136142 [details] [review]
Bug 30234: Fix local cover image display for other holdings

Bug 26145 added the ability to add local cover images to items.
If SeparateHoldings is set, items from other libraries are displayed in
a separate tab, and not considered as visible. We have a JS test to
assume that images not shown are not present, this only apply for the
images for the bibliographic record, as they can come from different
sources.

Test plan:
Turn on LocalCoverImages and SeparateHoldings
Create a record with different items coming from different libraries
Attach images to items and to the biblio
Notice that with this patch you can see the images from the "Other
holdings" tab
Comment 22 Jonathan Druart 2022-06-16 10:11:02 UTC
Looks like without this patch we don't even see the cover images for the item in 'Holdings'.

Upping severity.
Comment 23 David Nind 2022-06-16 12:10:42 UTC
Created attachment 136154 [details] [review]
Bug 30234: Fix local cover image display for other holdings

Bug 26145 added the ability to add local cover images to items.
If SeparateHoldings is set, items from other libraries are displayed in
a separate tab, and not considered as visible. We have a JS test to
assume that images not shown are not present, this only apply for the
images for the bibliographic record, as they can come from different
sources.

Test plan:
Turn on LocalCoverImages and SeparateHoldings
Create a record with different items coming from different libraries
Attach images to items and to the biblio
Notice that with this patch you can see the images from the "Other
holdings" tab

Signed-off-by: David Nind <david@davidnind.com>
Comment 24 Katrin Fischer 2022-06-18 21:14:57 UTC
Created attachment 136324 [details] [review]
Bug 30234: Fix local cover image display for other holdings

Bug 26145 added the ability to add local cover images to items.
If SeparateHoldings is set, items from other libraries are displayed in
a separate tab, and not considered as visible. We have a JS test to
assume that images not shown are not present, this only apply for the
images for the bibliographic record, as they can come from different
sources.

Test plan:
Turn on LocalCoverImages and SeparateHoldings
Create a record with different items coming from different libraries
Attach images to items and to the biblio
Notice that with this patch you can see the images from the "Other
holdings" tab

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 25 Tomás Cohen Arazi 2022-06-20 14:50:50 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 26 Lucas Gass 2022-06-24 16:23:54 UTC
Backported to 22.05.x for 22.05.01
Comment 27 Arthur Suzuki 2022-06-30 08:34:28 UTC
patch fixes the issue on 21.11.x, pushed for 21.11.10
Comment 28 Victor Grousset/tuxayo 2022-07-14 19:39:11 UTC
Backported: Pushed to 21.05.x branch for 21.05.17
Nothing to document, marking resolved.