Bugzilla – Attachment 167526 Details for
Bug 36217
Jobs page include last hour filter does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36217: Fix background jobs page's include_last_hour filter
0001-Bug-36217-Fix-background-jobs-page-s-include_last_ho.patch (text/plain), 1.86 KB, created by
Emmi Takkinen
on 2024-06-06 08:56:02 UTC
(
hide
)
Description:
Bug 36217: Fix background jobs page's include_last_hour filter
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2024-06-06 08:56:02 UTC
Size:
1.86 KB
patch
obsolete
>From c7d5192add6bdd1eb50fde4ed74b35ce2d8525ed Mon Sep 17 00:00:00 2001 >From: Ville Korjus <trainee@koha-suomi.fi> >Date: Tue, 25 Apr 2023 13:00:24 +0300 >Subject: [PATCH] Bug 36217: Fix background jobs page's include_last_hour > filter > >Test plan: >1) Create a background job >2) Go to the background jobs page >3) See your job listed >4) Unselect "include_last_hour" from the filter >5) Verify that the job is not listed >6) Apply the patch >7) Repeat steps 1-3 >8) Verify that the job is now listed >--- > .../prog/en/modules/admin/background_jobs.tt | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt >index e23f04ba41..01b023c0df 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt >@@ -262,11 +262,14 @@ > let additional_filters = { > enqueued_on: function(){ > let now = new Date(); >+ var tzoffset = (new Date()).getTimezoneOffset() * 60000; >+ if ( $("#only_current").is(":checked") && !$("#include_last_hour").is(":checked")) { >+ return 0; >+ } > if ( $("#include_last_hour").is(":checked") ) { >- now.setHours(now.getHours() - 1); >- return { ">": now.toISOString() }; >+ return { ">": (new Date(now.setHours(now.getHours() - 1) - tzoffset)).toISOString().slice(0, -1) }; > } else { >- return { "<": now.toISOString() }; >+ return { "<": (new Date(Date.now() - tzoffset)).toISOString().slice(0, -1) }; > } > } > }; >-- >2.34.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36217
:
167526
|
169190
|
169549
|
169635
|
169694
|
171018
|
171019
|
171020
|
171297
|
171298
|
171299