Bug 23083 - Course reserve item edit fails if one does not set all values
Summary: Course reserve item edit fails if one does not set all values
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Course reserves (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-07 20:20 UTC by Andrew Fuerste-Henry
Modified: 2019-07-26 15:49 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.03


Attachments
Bug 23083: Add tests (1.40 KB, patch)
2019-06-20 01:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED (1.84 KB, patch)
2019-06-20 01:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 23083: Add tests (1.46 KB, patch)
2019-07-01 09:03 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED (1.91 KB, patch)
2019-07-01 09:03 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23083: Add tests (1.55 KB, patch)
2019-07-05 05:45 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED (2.00 KB, patch)
2019-07-05 05:45 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2019-06-07 20:20:40 UTC
To Test:
1: Create an item with itype, ccode, location, and holding branch set
2: Create a course
3: Add item to course, changing the values for itype, ccode, and location
4: Click Edit for that item on course-details.pl
5: Assign new values for itype, ccode, and location but leave the holding library dropdown set to LEAVE UNCHANGED
6: Hit Save
7: Back on course-details.pl, observe that the item is still showing the values set in step 3
8: Edit the course reserve again, setting new values for itype, ccode, and location and setting the holding library dropdown to whatever the holding library for the item is currently
9: hit save
10: On course-details.pl, see that the change actually happened, the item is now showing the values set in step 9
Comment 1 Jonathan Druart 2019-06-08 18:21:15 UTC
I think the patch on bug 22630 (Do not modify item fields if course reserve item says LEAVE UNCHANGED) will fix this.
Comment 2 Andrew Fuerste-Henry 2019-06-10 12:23:06 UTC
Confirmed that applying the patch from 22630 fixes this. I'll mark this bug a dupe of that one. Thanks!
Comment 3 Andrew Fuerste-Henry 2019-06-10 12:23:22 UTC

*** This bug has been marked as a duplicate of bug 22630 ***
Comment 4 Jonathan Druart 2019-06-10 13:13:37 UTC
Instead I think the patch should be moved here, bug 22630 is an enhancement and will not be backported.
Comment 5 Katrin Fischer 2019-06-10 13:54:31 UTC
(In reply to Jonathan Druart from comment #4)
> Instead I think the patch should be moved here, bug 22630 is an enhancement
> and will not be backported.

I agree, not a real duplicate in this case, deduplicating, changing to a see also.
Comment 6 Katrin Fischer 2019-06-17 21:18:05 UTC
Updating severity
Comment 7 Jonathan Druart 2019-06-20 01:15:33 UTC
Created attachment 90818 [details] [review]
Bug 23083: Add tests
Comment 8 Jonathan Druart 2019-06-20 01:15:36 UTC
Created attachment 90819 [details] [review]
Bug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED

Test plan:
0: Do not apply the patches
1: Create an item with itype, ccode, location, and holding branch set
2: Create a course
3: Add item to course, changing the values for itype, ccode, and location
4: Click Edit for that item on course-details.pl
5: Assign new values for itype, ccode, and location but leave the holding library dropdown set to LEAVE UNCHANGED
6: Hit Save
7: Back on course-details.pl, observe that the item is still showing the values set in step 3
8: Apply this patch
9: Repeat 4 to 6
10: Back on course-details.pl, observe that the item is now showing the correct values
11: Edit the course reserve again, setting new values for itype, ccode, and location and setting the holding library dropdown to whatever the holding library for the item is currently
12: hit save
13: On course-details.pl, see that the change actually happened, the item is now showing the values set in step 9
Comment 9 Martin Renvoize 2019-07-01 09:03:28 UTC
Created attachment 91134 [details] [review]
Bug 23083: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2019-07-01 09:03:31 UTC
Created attachment 91135 [details] [review]
Bug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED

Test plan:
0: Do not apply the patches
1: Create an item with itype, ccode, location, and holding branch set
2: Create a course
3: Add item to course, changing the values for itype, ccode, and location
4: Click Edit for that item on course-details.pl
5: Assign new values for itype, ccode, and location but leave the holding library dropdown set to LEAVE UNCHANGED
6: Hit Save
7: Back on course-details.pl, observe that the item is still showing the values set in step 3
8: Apply this patch
9: Repeat 4 to 6
10: Back on course-details.pl, observe that the item is now showing the correct values
11: Edit the course reserve again, setting new values for itype, ccode, and location and setting the holding library dropdown to whatever the holding library for the item is currently
12: hit save
13: On course-details.pl, see that the change actually happened, the item is now showing the values set in step 9

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2019-07-01 09:03:51 UTC
Fix works for me in testing, Signing Off
Comment 12 Marcel de Rooy 2019-07-05 05:45:23 UTC
Created attachment 91309 [details] [review]
Bug 23083: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 13 Marcel de Rooy 2019-07-05 05:45:28 UTC
Created attachment 91310 [details] [review]
Bug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED

Test plan:
0: Do not apply the patches
1: Create an item with itype, ccode, location, and holding branch set
2: Create a course
3: Add item to course, changing the values for itype, ccode, and location
4: Click Edit for that item on course-details.pl
5: Assign new values for itype, ccode, and location but leave the holding library dropdown set to LEAVE UNCHANGED
6: Hit Save
7: Back on course-details.pl, observe that the item is still showing the values set in step 3
8: Apply this patch
9: Repeat 4 to 6
10: Back on course-details.pl, observe that the item is now showing the correct values
11: Edit the course reserve again, setting new values for itype, ccode, and location and setting the holding library dropdown to whatever the holding library for the item is currently
12: hit save
13: On course-details.pl, see that the change actually happened, the item is now showing the values set in step 9

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 14 Martin Renvoize 2019-07-05 07:45:39 UTC
Nice work!

Pushed to master for 19.11.00
Comment 15 Fridolin SOMERS 2019-07-25 13:39:59 UTC
Pushed to 19.05.x for 19.05.03
Comment 16 Lucas Gass 2019-07-26 15:49:21 UTC
backported to 18.11.x for 18.11.09