Bug 24121

Summary: Item types icons in intra search results are requesting icons from opac images path
Product: Koha Reporter: Pedro Amorim <pjamorim91>
Component: SearchingAssignee: Pedro Amorim <pjamorim91>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: 1joynelson, fridolin.somers, hayleypelham, jonathan.druart, lucas
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32908
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32909
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.02, 19.05.07, 18.11.13
Bug Depends on: 14385    
Bug Blocks:    
Attachments: Fix for knowing correct interface (opac or intra) when requesting itemtype icons
Bug 24121 - Item types icons in intra search results are requesting icons from opac images path if item-level_itypes syspref is set to biblio
Bug 24121 - Item types icons in intra search results are requesting icons from opac images path
Bug 24121: Item types icons in intra search results are requesting icons from opac images path
Bug 24121: Item types icons in intra search results are requesting icons from opac images path

Description Pedro Amorim 2019-11-26 13:22:48 UTC

    
Comment 1 Pedro Amorim 2019-11-26 13:25:26 UTC
Created attachment 95827 [details] [review]
Fix for knowing correct interface (opac or intra) when requesting itemtype icons
Comment 2 Pedro Amorim 2019-11-26 13:26:22 UTC
Itemtype icons in intra search results are pointing to opac image path, this patch fixes that.
Comment 3 Pedro Amorim 2019-11-26 15:25:57 UTC
Edited original title of "Item types icons not showing in intra search results if item-level_itypes syspref is set to biblio" to something more accurate.
The original reason it was not showing for my installation is something specific (IP and port access - instead of url) but the fix still remains relevant, I believe.
Comment 4 Jonathan Druart 2019-11-28 11:31:50 UTC
Caused by
  commit 5e4e10c4ca558180137bf5a4ff5a68495efa0ec7
  Bug 14385: Extend OpacHiddenItems to allow specifying exempt borrower categories
Comment 5 Owen Leonard 2019-12-02 15:51:02 UTC
Pedro this patch looks good and I'm ready so sign off on it, but it needs a good commit message. Please look at the guidelines here:

https://wiki.koha-community.org/wiki/Commit_messages

Thanks!
Comment 6 Jonathan Druart 2019-12-10 08:17:46 UTC
*** Bug 24198 has been marked as a duplicate of this bug. ***
Comment 7 Pedro Amorim 2019-12-10 12:26:20 UTC
Created attachment 96146 [details] [review]
Bug 24121 - Item types icons in intra search results are requesting icons from opac images path if item-level_itypes syspref is set to biblio

Please let me know if this looks good, Owen. Thank you.
Comment 8 Fridolin Somers 2019-12-11 11:14:37 UTC
(In reply to Pedro Amorim from comment #7)
> Created attachment 96146 [details] [review] [review]
> Bug 24121 - Item types icons in intra search results are requesting icons
> from opac images path if item-level_itypes syspref is set to biblio
> 
> Please let me know if this looks good, Owen. Thank you.

Not yet, commit message must start with :
"Bug 24121: "

And message is too long, I propose you remove "if item-level_itypes syspref is set to biblio" it is in description.
Comment 9 Pedro Amorim 2019-12-11 11:30:53 UTC
Created attachment 96194 [details] [review]
Bug 24121 - Item types icons in intra search results are requesting icons from opac images path

Hello Fridolin, thank you for your time. Let me know if it's okay now.
Comment 10 Fridolin Somers 2019-12-20 07:49:04 UTC
Created attachment 96506 [details] [review]
Bug 24121: Item types icons in intra search results are requesting icons from opac images path

When searching in INTRA you'll notice the item type icons not showing.

To test:
1) Set syspref item-level_itypes to biblio
2) Confirm that there is a biblioitems.itemtype mapping to a MARC field
3) Verify that item type icons are set for all the types
4) Perform a search where biblios with said MARC field is filled with a type value
5) Verify that where the icon should appear, it's showing the browser icon for image not found
6) Apply patch.
7) Repeat step 4.
8) Observe the icons are now displayed correctly

Sponsored-by: Governo Regional dos Açores
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 11 Katrin Fischer 2019-12-22 14:46:48 UTC
Created attachment 96575 [details] [review]
Bug 24121: Item types icons in intra search results are requesting icons from opac images path

When searching in INTRA you'll notice the item type icons not showing.

To test:
1) Set syspref item-level_itypes to biblio
2) Confirm that there is a biblioitems.itemtype mapping to a MARC field
3) Verify that item type icons are set for all the types
4) Perform a search where biblios with said MARC field is filled with a type value
5) Verify that where the icon should appear, it's showing the browser icon for image not found
6) Apply patch.
7) Repeat step 4.
8) Observe the icons are now displayed correctly

Sponsored-by: Governo Regional dos Açores
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Martin Renvoize 2019-12-23 12:09:28 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 13 Joy Nelson 2020-01-12 19:02:36 UTC
Pushed to 19.11.x branch for 19.11.02
Comment 14 Lucas Gass 2020-01-13 23:21:53 UTC
backported to 19.05.x for 19.05.07
Comment 15 Hayley Pelham 2020-01-15 01:30:43 UTC
Backported to 18.11.x for 18.11.13