The batch extend due dates tool isn't working with the following criteria in 24.05: Selected: library, patron category, and item type (one each) Due date range: input Added X number of days to existing due date Preview: same behavior whether it is deselected or selected When I click Continue, I'm returned to a blank 'Batch extend due date' screen, and due dates are not updated in patrons' accounts.
Created attachment 169963 [details] [review] Bug 37483: batch extend due dates list is a stateless action Remove cud- from op and submit form as get To test: 1 - Checkout some items to patrons of at least two libraries 2 - Tools -> Batch extend due dates 3 - Select nothing except 'preview' and submit 4 - Blank screen 5 - Apply patch, repeat 6 - It works! 7 - Filter by library and confirm it still works 8 - Sign off!
Created attachment 170023 [details] [review] Bug 37483: batch extend due dates list is a stateless action Remove cud- from op and submit form as get To test: 1 - Checkout some items to patrons of at least two libraries 2 - Tools -> Batch extend due dates 3 - Select nothing except 'preview' and submit 4 - Blank screen 5 - Apply patch, repeat 6 - It works! 7 - Filter by library and confirm it still works 8 - Sign off! Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
This one's a bit messy..."(cud-)list" is sent as the op regardless of whether "Preview results first" is checked or not. If "Preview results first" is not checked, then it is very much a CUD action!
(In reply to Emily Lamancusa from comment #3) > This one's a bit messy..."(cud-)list" is sent as the op regardless of > whether "Preview results first" is checked or not. If "Preview results > first" is not checked, then it is very much a CUD action! How about making this the opposite way, i.e. just: --- a/tools/batch_extend_due_dates.pl +++ b/tools/batch_extend_due_dates.pl @@ -46,7 +46,7 @@ my @issue_ids; if ( $op eq 'form' ) { $template->param( view => 'form', ); } -elsif ( $op eq 'list' ) { +elsif ( $op eq 'cud-list' ) { my @categorycodes = $input->multi_param('categorycodes'); my @itemtypecodes = $input->multi_param('itemtypecodes'); Nick, what do you think?
In fact, if ! $preview_results then $op = 'cud-modify' (line 141) and the script continues with cud-modify (from line 145).
Created attachment 171610 [details] [review] Bug 37483: Use cud-list for extend due dates tool This patch switch the check in the script to 'cud-list' - we use the same form submission if listing for preview or directly updating dates, so this may or may not be a cud- action - assuming it is restores script functionality. See bug 37941 for updating forms to not share actions To test: 1 - Checkout some items to patrons of at least two libraries 2 - Tools -> Batch extend due dates 3 - Select nothing except 'preview' and submit 4 - Blank screen 5 - Apply patch, repeat 6 - It works! 7 - Filter by library and confirm it still works 8 - Sign off!
Created attachment 171616 [details] [review] Bug 37483: Use cud-list for extend due dates tool This patch switch the check in the script to 'cud-list' - we use the same form submission if listing for preview or directly updating dates, so this may or may not be a cud- action - assuming it is restores script functionality. See bug 37941 for updating forms to not share actions To test: 1 - Checkout some items to patrons of at least two libraries 2 - Tools -> Batch extend due dates 3 - Select nothing except 'preview' and submit 4 - Blank screen 5 - Apply patch, repeat 6 - It works! 7 - Filter by library and confirm it still works 8 - Sign off! Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Created attachment 171827 [details] [review] Bug 37483: Use cud-list for extend due dates tool This patch switch the check in the script to 'cud-list' - we use the same form submission if listing for preview or directly updating dates, so this may or may not be a cud- action - assuming it is restores script functionality. See bug 37941 for updating forms to not share actions To test: 1 - Checkout some items to patrons of at least two libraries 2 - Tools -> Batch extend due dates 3 - Select nothing except 'preview' and submit 4 - Blank screen 5 - Apply patch, repeat 6 - It works! 7 - Filter by library and confirm it still works 8 - Sign off! Signed-off-by: Janusz Kaczmarek <januszop@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.05
Depends on Bug 34478 not in 23.11.x