Bug 20216 - Editing itemtypes does not pull existing values correctly
Summary: Editing itemtypes does not pull existing values correctly
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on: 12768
Blocks: 23772 23804
  Show dependency treegraph
 
Reported: 2018-02-15 17:05 UTC by Nick Clemens
Modified: 2020-06-04 20:32 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 20216: Correctly populate values in itemtype editor (3.24 KB, patch)
2018-02-15 17:07 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20216: Correctly populate values in itemtype editor (3.29 KB, patch)
2018-02-15 17:57 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20216: (follow-up) - Fix other use of remote_image (1.31 KB, patch)
2018-02-15 18:43 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20216: Correctly populate values in itemtype editor (3.53 KB, patch)
2018-02-15 19:03 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 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 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 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 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