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: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Kyle M Hall (khall)
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 (khall)
Modified: 2021-06-14 21:33 UTC (History)
5 users (show)

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


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 (khall)
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
Bug 25101: Add ability to skip previewing results when batch extending due dates (5.45 KB, patch)
2020-08-29 11:00 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 25101: (follow-up) Tick preview checkbox on by default (1.42 KB, patch)
2020-08-29 11:00 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 25101: (QA follow-up) Add hint to new option (1.33 KB, patch)
2020-08-29 11:00 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 25101: (QA follow-up) Fix hint for new option (1.36 KB, patch)
2020-09-01 12:58 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 25101: Add ability to skip previewing results when batch extending due dates (5.80 KB, patch)
2020-09-02 13:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25101: (follow-up) Tick preview checkbox on by default (1.51 KB, patch)
2020-09-02 13:06 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 Kyle M Hall (khall) 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 (khall) 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 (khall) 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 (khall) 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 (khall) 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 (khall) 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?
Comment 13 Katrin Fischer 2020-08-29 11:00:28 UTC
Created attachment 109292 [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>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2020-08-29 11:00:32 UTC
Created attachment 109293 [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.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Katrin Fischer 2020-08-29 11:00:36 UTC
Created attachment 109294 [details] [review]
Bug 25101: (QA follow-up) Add hint to new option

Adds a hint about the large numbers behind the new
checkbox option.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2020-08-29 11:01:38 UTC
If I understand correctly jumping the preview helps in that the renewals will be done. Even if the screen times out, they will finish in the background, but with the preview step in between, you never get there.

I have tried to add the hint Joubu asked for - please feel free to rephrase!
Comment 17 Jonathan Druart 2020-08-31 13:00:22 UTC
No, the hint is not correct IMO.
The preview will fail if there is a large amounts of due dates to extend.
Comment 18 Katrin Fischer 2020-08-31 13:02:24 UTC
Oh, you are right - good intentions, but wrong "direction". Kyle, could you provide a rephrase maybe?
Comment 19 Kyle M Hall (khall) 2020-08-31 16:40:14 UTC
* The preview will fail if there is a large amounts of due dates to extend.

* This is recommended when changing very large numbers of due dates.

I don't see the difference here. Jonathan, would you like me to use your direct phrasing as the hint?
Comment 20 Jonathan Druart 2020-09-01 07:44:33 UTC
I am not a native English speaker but for me the 2 sentences have opposite sense.

The hint from Katrin's patch is
  "This is recommended when changing very large numbers of due dates."

Which means: you should check it if you are processing a lot of issues.

It's the reverse, if the checkbox is checked we are going to display the preview screen, which will fail if the amount of due dates is too large.
Comment 21 Katrin Fischer 2020-09-01 07:46:51 UTC
A new day, maybe the fix is simple:

"This is not recommended when changing very large numbers of due dates."
Comment 22 Kyle M Hall (khall) 2020-09-01 12:44:49 UTC
(In reply to Jonathan Druart from comment #20)
> I am not a native English speaker but for me the 2 sentences have opposite
> sense.
> 
> The hint from Katrin's patch is
>   "This is recommended when changing very large numbers of due dates."
> 
> Which means: you should check it if you are processing a lot of issues.
> 
> It's the reverse, if the checkbox is checked we are going to display the
> preview screen, which will fail if the amount of due dates is too large.

Ah! That wasn't clicking for me, thanks!
Comment 23 Kyle M Hall (khall) 2020-09-01 12:45:02 UTC
(In reply to Katrin Fischer from comment #21)
> A new day, maybe the fix is simple:
> 
> "This is not recommended when changing very large numbers of due dates."

Perfect!
Comment 24 Kyle M Hall (khall) 2020-09-01 12:58:40 UTC
Created attachment 109425 [details] [review]
Bug 25101: (QA follow-up) Fix hint for new option
Comment 25 Jonathan Druart 2020-09-02 13:06:13 UTC
Created attachment 109529 [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>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 25101: (QA follow-up) Add hint to new option

Adds a hint about the large numbers behind the new
checkbox option.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 25101: (QA follow-up) Fix hint for new option
Comment 26 Jonathan Druart 2020-09-02 13:06:17 UTC
Created attachment 109530 [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.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 27 Jonathan Druart 2020-09-02 13:35:58 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 28 Lucas Gass (lukeg) 2020-09-04 21:19:42 UTC
enhancement will not be backported to 20.05.x