Bug 20216

Summary: Editing itemtypes does not pull existing values correctly
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: System AdministrationAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, martin.renvoize, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 12768    
Bug Blocks: 23772, 23804    
Attachments: Bug 20216: Correctly populate values in itemtype editor
Bug 20216: Correctly populate values in itemtype editor
Bug 20216: (follow-up) - Fix other use of remote_image
Bug 20216: Correctly populate values in itemtype editor

Description Nick Clemens (kidclamp) 2018-02-15 17:05:18 UTC
To recreate:
1 - Edit an item type, define a replacement cost,processing fee, and remote image url
2 - Save the item type
3 - Values are correct in list
4 - Edit again
5 - note values in fields are not populated
6 - Save itemtype, values are lost
Comment 1 Nick Clemens (kidclamp) 2018-02-15 17:07:08 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2018-02-15 17:57:44 UTC
Created attachment 71675 [details] [review]
Bug 20216: Correctly populate values in itemtype editor

To test:
1 - Edit an item type, define a replacement cost,processing fee, and
remote image url
2 - Save the item type
3 - Values are correct in list
4 - Edit again
5 - note values in fields are not populated
6 - Save itemtype, values are lost
7 - Apply patch
8 - Repeat 1-4
9 - Values should be correctly populated and saved now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Jonathan Druart 2018-02-15 18:15:23 UTC
This part reads wrong:

204                                 [% IF ( remote_image ) %]
205                                     <img src="[% itemtype.imageurl %]" alt="" />
206                                 [% END %]

Must be IF itemtype.imageurl I guess.
Comment 4 Nick Clemens (kidclamp) 2018-02-15 18:43:17 UTC
Created attachment 71678 [details] [review]
Bug 20216: (follow-up) - Fix other use of remote_image
Comment 5 Jonathan Druart 2018-02-15 19:03:55 UTC
Created attachment 71693 [details] [review]
Bug 20216: Correctly populate values in itemtype editor

Caused by a bad merge conflict on bug 12768.

To test:
1 - Edit an item type, define a replacement cost,processing fee, and
remote image url
2 - Save the item type
3 - Values are correct in list
4 - Edit again
5 - note values in fields are not populated
6 - Save itemtype, values are lost
7 - Apply patch
8 - Repeat 1-4
9 - Values should be correctly populated and saved now

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

Bug 20216: (follow-up) - Fix other use of remote_image

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2018-02-15 19:05:56 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Nick Clemens (kidclamp) 2018-06-29 15:50:11 UTC
Frido, I think I missed this one, needed for 17.11
Comment 8 Fridolin Somers 2018-07-23 08:57:05 UTC
Pushed to 17.11 for 17.11.08
Comment 9 Fridolin Somers 2018-07-23 08:57:57 UTC
Depends on Bug 12768 not in 17.05.x