Bug 32596: Filter jobs by enqueued on, not started on

To test:
1 - Do a bunch of stuff in the staff interface the will generate background jobs
2 - Wait a bit to make sure all the jobs are done
3 - Visit Admin->Jobs
4 - Note there is nothing shown
5 - uncheck 'Current jobs only' and 'Only include jobs started in the last hour'
6 - Note that nothing is shown, but header says '(filtered from X jobs)'
7 - Apply patch
8 - Reload table
9 - Confirm you can see the finished jobs now

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b1488f251)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit b7ecfa0138)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2023-01-09 14:09:29 +00:00 committed by Lucas Gass
parent e97e947efc
commit bddcf045cc

View file

@ -121,7 +121,7 @@
<div>
<input type="checkbox" id="include_last_hour" checked />
<label for="include_last_hour">Only include jobs started in the last hour</label>
<label for="include_last_hour">Only include jobs enqueued in the last hour</label>
</div>
<table id="table_jobs">
@ -238,7 +238,7 @@
[% END %]
let additional_filters = {
started_on: function(){
enqueued_on: function(){
let now = new Date();
if ( $("#include_last_hour").is(":checked") ) {
now.setHours(now.getHours() - 1);