Bug 25101 - Add ability to skip previewing results when batch extending due dates
Summary: Add ability to skip previewing results when batch extending due dates
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
: 25088 (view as bug list)
Depends on: 25020
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-09 17:21 UTC by Kyle M Hall
Modified: 2020-07-22 13:24 UTC (History)
4 users (show)

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


Attachments
Bug 25101: Add ability to skip previewing results when batch extending due dates (5.34 KB, patch)
2020-04-09 17:24 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25101: Add ability to skip previewing results when batch extending due dates (5.40 KB, patch)
2020-04-09 18:07 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 25101: (follow-up) Tick preview checkbox on by default (1.37 KB, patch)
2020-07-15 15:54 UTC, Joonas Kylmälä
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2020-04-09 17:21:39 UTC
For sites with very large amounts of due dates to extend ( tens of thousands ), it can take a very long time of the results to load ( if at all ). It would be good to have a way to bypass the confirmation screen, instead directly updating the due dates before displaying the results.
Comment 1 Kyle M Hall 2020-04-09 17:24:20 UTC
Created attachment 102650 [details] [review]
Bug 25101: Add ability to skip previewing results when batch extending due dates

For sites with very large amounts of due dates to extend ( tens of thousands ), it can take a very long time of the results to load ( if at all ). It would be good to have a way to bypass the confirmation screen, instead directly updating the due dates before displaying the results.

Test Plan:
1) Apply this patch
2) Browse to tools/batch_extend_due_dates.pl
3) Note the new "Preview results" checkbox
4) Submit form with the checkbox unchecked, due dates should be updated
   without previewing the checkouts
5) Submit form with the checkbox checked, tool should function as
   it did previously
Comment 2 ByWater Sandboxes 2020-04-09 18:07:01 UTC
Created attachment 102654 [details] [review]
Bug 25101: Add ability to skip previewing results when batch extending due dates

For sites with very large amounts of due dates to extend ( tens of thousands ), it can take a very long time of the results to load ( if at all ). It would be good to have a way to bypass the confirmation screen, instead directly updating the due dates before displaying the results.

Test Plan:
1) Apply this patch
2) Browse to tools/batch_extend_due_dates.pl
3) Note the new "Preview results" checkbox
4) Submit form with the checkbox unchecked, due dates should be updated
   without previewing the checkouts
5) Submit form with the checkbox checked, tool should function as
   it did previously

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Comment 3 Kyle M Hall 2020-04-09 18:18:58 UTC
*** Bug 25088 has been marked as a duplicate of this bug. ***
Comment 4 Jonathan Druart 2020-04-10 08:29:33 UTC
Hi Kyle,

Regarding the comments and numbers from bug 25088, I do not understand how this patch could fix the problem.
Did you identify the bottleneck?

I mean, if the preview screen timeout I am expecting the confirmation screen to timeout as well. And I feel like it's better to timeout in the preview screen if there are too many matching rows (at least there is not only an unknown part of the set that is modified).

If it's really the first screen that is a problem, that means there are superfluoux datetime manipulations (see my patch on bug 25008 to give you an idea) or something else that is causing the timeout.
Comment 5 Jonathan Druart 2020-04-10 08:36:09 UTC
Also I think we should have the checkbox checked by default, and a note/tooltip explaining a bit what's doing exactly.
Comment 6 Kyle M Hall 2020-04-10 13:56:06 UTC
(In reply to Jonathan Druart from comment #5)
> Also I think we should have the checkbox checked by default, and a
> note/tooltip explaining a bit what's doing exactly.

With this patch, it can at least run. 

I'll file a followup for that.
Comment 7 Jonathan Druart 2020-04-13 10:16:33 UTC
What about adding a command line script instead?
Comment 8 Kyle M Hall 2020-04-13 10:52:43 UTC
(In reply to Jonathan Druart from comment #7)
> What about adding a command line script instead?

The purpose of the tool is to allow librarians to update the due dates themselves. A cli tool would obviate the point of the tool.
Comment 9 Joonas Kylmälä 2020-07-15 15:54:57 UTC
Created attachment 106937 [details] [review]
Bug 25101: (follow-up) Tick preview checkbox on by default

This would prevent any unintended batch renewals as it is easy
to miss the option in the screen.
Comment 10 Joonas Kylmälä 2020-07-15 15:56:43 UTC
Kyle, I added patch for enabling the checkbox by default. Please let us know how you want to proceed with this, now this in bit of a limbo state.
Comment 11 Kyle M Hall 2020-07-22 13:05:12 UTC
(In reply to Joonas Kylmälä from comment #10)
> Kyle, I added patch for enabling the checkbox by default. Please let us know
> how you want to proceed with this, now this in bit of a limbo state.

That is fine by me!
Comment 12 Joonas Kylmälä 2020-07-22 13:24:07 UTC
(In reply to Kyle M Hall from comment #11)
> That is fine by me!

Just to be clear, ready for someone to QA?