Bug 37409 - Edit button for items in course reserves list doesn't work
Summary: Edit button for items in course reserves list doesn't work
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Course reserves (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Sam Lau
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 36192
Blocks:
  Show dependency treegraph
 
Reported: 2024-07-18 19:18 UTC by Gretchen Maxeiner
Modified: 2024-09-11 16:52 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes editing existing reserves for a course (when using course reserves). Editing a reserve was opening the add reserve form, instead of letting you edit the existing reserve. (This is related to the CSRF changes added in Koha 24.05 to improve form security.)
Version(s) released in:
24.11.00,24.05.04
Circulation function:


Attachments
Bug 37409: Fix 'Edit' button for items in course reserves list (2.57 KB, patch)
2024-07-26 21:07 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 37409: Fix 'Edit' button for items in course reserves list (2.62 KB, patch)
2024-07-26 21:49 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 37409: Fix 'Edit' button for items in course reserves list (2.72 KB, patch)
2024-08-02 07:49 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 37409: Fix 'Edit' button for items in course reserves list (2.57 KB, patch)
2024-08-02 16:01 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 37409: Fix 'Edit' button for items in course reserves list (2.62 KB, patch)
2024-08-02 22:20 UTC, David Nind
Details | Diff | Splinter Review
Bug 37409: Fix 'Edit' button for items in course reserves list (2.72 KB, patch)
2024-08-16 08:00 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 Gretchen Maxeiner 2024-07-18 19:18:05 UTC
In a course reserve list in the staff interface, the edit button on individual items in the list doesn't actually offer the ability to edit the item's reserve information. Instead, it goes back to the typical "Add Items" screen where the user can enter a barcode or biblionumber. Through clicks here you can get to a place to edit, but it is the same as if you click "Add reserves" on the course details and enter a barcode/biblionumber already on the list. I don't believe this is the expected behavior when clicking the Edit button.
Comment 1 Sam Lau 2024-07-26 21:07:03 UTC
Created attachment 169791 [details] [review]
Bug 37409: Fix 'Edit' button for items in course reserves list

To test:
1) Set the 'UseCourseReserves' sys pref to 'Use'
2) Go to the Course reserves page
3) Create a new course, fill in the required info and make sure the 'Enabled?' is checked
4) Add a reserve to this course
5) From the course details page, select edit on the reserve you just made.
6) Note it brings you back to the add reserves page, and you are required to enter the barcode/biblionumber again to edit
7) Apply patch, restart_all
8) Press the edit button again
9) Now you are directed towards the correct page for editing
10) Make some changes and press save
11) You should be redirected back to the details page and your changes have been made
Comment 2 Roman Dolny 2024-07-26 21:49:47 UTC
Created attachment 169792 [details] [review]
Bug 37409: Fix 'Edit' button for items in course reserves list

To test:
1) Set the 'UseCourseReserves' sys pref to 'Use'
2) Go to the Course reserves page
3) Create a new course, fill in the required info and make sure the 'Enabled?' is checked
4) Add a reserve to this course
5) From the course details page, select edit on the reserve you just made.
6) Note it brings you back to the add reserves page, and you are required to enter the barcode/biblionumber again to edit
7) Apply patch, restart_all
8) Press the edit button again
9) Now you are directed towards the correct page for editing
10) Make some changes and press save
11) You should be redirected back to the details page and your changes have been made

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Marcel de Rooy 2024-08-02 07:49:07 UTC
Created attachment 169990 [details] [review]
Bug 37409: Fix 'Edit' button for items in course reserves list

To test:
1) Set the 'UseCourseReserves' sys pref to 'Use'
2) Go to the Course reserves page
3) Create a new course, fill in the required info and make sure the 'Enabled?' is checked
4) Add a reserve to this course
5) From the course details page, select edit on the reserve you just made.
6) Note it brings you back to the add reserves page, and you are required to enter the barcode/biblionumber again to edit
7) Apply patch, restart_all
8) Press the edit button again
9) Now you are directed towards the correct page for editing
10) Make some changes and press save
11) You should be redirected back to the details page and your changes have been made

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2024-08-02 07:50:02 UTC
Seems that changing action to lookup should be enough? You also change itemnumber to barcode. But should work too (normally)..
Comment 5 Marcel de Rooy 2024-08-02 07:50:20 UTC
(In reply to Marcel de Rooy from comment #4)
> Seems that changing action to lookup should be enough? You also change
> itemnumber to barcode. But should work too (normally)..

Sorry read op=lookup
Comment 6 Katrin Fischer 2024-08-02 15:31:49 UTC
(In reply to Marcel de Rooy from comment #5)
> (In reply to Marcel de Rooy from comment #4)
> > Seems that changing action to lookup should be enough? You also change
> > itemnumber to barcode. But should work too (normally)..
> 
> Sorry read op=lookup

Hm, this could cause a regression if a barcode was to be removed from an item in a course reserve. Any reason to not keep the itemnumber?
Comment 7 Sam Lau 2024-08-02 15:58:10 UTC
Good point, my bad
Comment 8 Sam Lau 2024-08-02 16:01:27 UTC
Created attachment 170007 [details] [review]
Bug 37409: Fix 'Edit' button for items in course reserves list

To test:
1) Set the 'UseCourseReserves' sys pref to 'Use'
2) Go to the Course reserves page
3) Create a new course, fill in the required info and make sure the 'Enabled?' is checked
4) Add a reserve to this course
5) From the course details page, select edit on the reserve you just made.
6) Note it brings you back to the add reserves page, and you are required to enter the barcode/biblionumber again to edit
7) Apply patch, restart_all
8) Press the edit button again
9) Now you are directed towards the correct page for editing
10) Make some changes and press save
11) You should be redirected back to the details page and your changes have been made
Comment 9 David Nind 2024-08-02 22:20:30 UTC
Created attachment 170025 [details] [review]
Bug 37409: Fix 'Edit' button for items in course reserves list

To test:
1) Set the 'UseCourseReserves' sys pref to 'Use'
2) Go to the Course reserves page
3) Create a new course, fill in the required info and make sure the 'Enabled?' is checked
4) Add a reserve to this course
5) From the course details page, select edit on the reserve you just made.
6) Note it brings you back to the add reserves page, and you are required to enter the barcode/biblionumber again to edit
7) Apply patch, restart_all
8) Press the edit button again
9) Now you are directed towards the correct page for editing
10) Make some changes and press save
11) You should be redirected back to the details page and your changes have been made

Signed-off-by: David Nind <david@davidnind.com>
Comment 10 Marcel de Rooy 2024-08-16 08:00:00 UTC
Created attachment 170435 [details] [review]
Bug 37409: Fix 'Edit' button for items in course reserves list

To test:
1) Set the 'UseCourseReserves' sys pref to 'Use'
2) Go to the Course reserves page
3) Create a new course, fill in the required info and make sure the 'Enabled?' is checked
4) Add a reserve to this course
5) From the course details page, select edit on the reserve you just made.
6) Note it brings you back to the add reserves page, and you are required to enter the barcode/biblionumber again to edit
7) Apply patch, restart_all
8) Press the edit button again
9) Now you are directed towards the correct page for editing
10) Make some changes and press save
11) You should be redirected back to the details page and your changes have been made

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Katrin Fischer 2024-08-16 15:37:13 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 12 Lucas Gass (lukeg) 2024-09-11 16:52:56 UTC
Backported to 24.05.x for upcoming 24.05.04