Bug 23804

Summary: Itemtype not checked when editing
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: System AdministrationAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: agustinmoyano, david, fridolin.somers, gmcharlt, koha-bugs, nick, testopia
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23772
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Circulation function:
Bug Depends on: 20216, 23602    
Bug Blocks:    
Attachments: Bug 23804: Correctly catch remote itemtype images
Images showing two issues identified 1) Weird display of remote image after patch applied 2) Images not displayed in table
Bug 23804: Correctly catch remote itemtype images
Bug 23804: Correctly catch remote itemtype images
Bug 23804: Correctly catch remote itemtype images
Bug 23804: Correctly catch remote itemtype images

Description Martin Renvoize (ashimema) 2019-10-11 12:41:23 UTC
+++ This bug was initially created as a clone of Bug #23772 +++

When looking at the new datatable for itemtypes, the itemtype icons are no longer displayed. The same happens, when editing an itemtype - the icon is no longer 'checked'. When you take a look at the db, the file names are there.
Comment 1 Martin Renvoize (ashimema) 2019-10-11 13:23:42 UTC Comment hidden (obsolete)
Comment 2 David Nind 2019-10-11 17:43:13 UTC
Created attachment 94028 [details]
Images showing two issues identified 1) Weird display of remote image after patch applied 2) Images not displayed in table

When testing this patch (which worked), I identified two issues:

1) After the patch is applied the remote image display is weird - after the input box and image there is an empty input box and the image is shown again (see issue 1 in attachment - shows before and after patch applied).

2) Not related to this bug, but does affect master. Images are not displayed in the image column (see issue 2 in attachment - shows images not displayed for current master (is the same before and after patch is applied), and for 19.05.x where it works correctly).
Comment 3 David Nind 2019-10-11 17:46:39 UTC
Argh! I see issue 2 is already a separate bug - 23772!

(Issue 1 still applies though)
Comment 4 Martin Renvoize (ashimema) 2019-10-15 13:20:34 UTC Comment hidden (obsolete)
Comment 5 Martin Renvoize (ashimema) 2019-10-15 13:21:38 UTC
Patch updated to remove the image when no url is set.

Also, bug 23772 is now pushed to the first issue is also resolved now.
Comment 6 Martin Renvoize (ashimema) 2019-10-15 13:23:11 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2019-10-15 14:24:45 UTC
Created attachment 94217 [details] [review]
Bug 23804: Correctly catch remote itemtype images

Bug 20216 missed the mark and although it did start display a URL for
the itemtype image in use, it was not limited to remote urls and as such
broke the checked handling for displaying which local image was
selected.

Test plan:
1) Select a local image for an itemtype.
2) Check the correct image is displayed in the admin table.
3) Edit the itemtype checking that the correct image is checked.
4) Change to a remote image for the itemtype
5) Check the correct image is displayed in the admin table.
6) Edit the itemtype again and check that the URL still displays and is
   checked in the 'Remote image' tab.
7) Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 8 Katrin Fischer 2019-10-16 06:14:38 UTC
Created attachment 94225 [details] [review]
Bug 23804: Correctly catch remote itemtype images

Bug 20216 missed the mark and although it did start display a URL for
the itemtype image in use, it was not limited to remote urls and as such
broke the checked handling for displaying which local image was
selected.

Test plan:
1) Select a local image for an itemtype.
2) Check the correct image is displayed in the admin table.
3) Edit the itemtype checking that the correct image is checked.
4) Change to a remote image for the itemtype
5) Check the correct image is displayed in the admin table.
6) Edit the itemtype again and check that the URL still displays and is
   checked in the 'Remote image' tab.
7) Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Martin Renvoize (ashimema) 2019-10-17 13:54:43 UTC
Nice work!

Pushed to master for 19.11.00
Comment 10 Fridolin Somers 2019-11-08 14:53:06 UTC
Depends on Bug 23602 not in 19.05.x