Bugzilla – Attachment 171404 Details for
Bug 37905
Correctly fix the "last hour" filter on the job list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37905: Use correct RFC3339 formatted date to the server
Bug-37905-Use-correct-RFC3339-formatted-date-to-th.patch (text/plain), 1.58 KB, created by
Jonathan Druart
on 2024-09-12 14:37:33 UTC
(
hide
)
Description:
Bug 37905: Use correct RFC3339 formatted date to the server
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-09-12 14:37:33 UTC
Size:
1.58 KB
patch
obsolete
>From f171c468c01ab838f9e8da776fa69bf8aa359e56 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 4 Sep 2024 14:20:33 +0200 >Subject: [PATCH] Bug 37905: Use correct RFC3339 formatted date to the server > >This patch suggests to revert the previous attempt to fix this problem. >The date was using the client-side's tz and so the "last hour" was not >matching the one from the server. > >With bug 37831 with simply need to pass a rfc3339-formatted date and the >filtering will be done as expected. >--- > .../intranet-tmpl/prog/en/modules/admin/background_jobs.tt | 6 ++---- > 1 file changed, 2 insertions(+), 4 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 fb92ebd0e1e..1c266d9f52a 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 >@@ -261,12 +261,10 @@ > > let additional_filters = { > enqueued_on: function(){ >- let now = new Date(); > if ( $("#include_last_hour").is(":checked") ) { >- now.setHours(now.getHours() - 1); >- return { ">": now.toISOString() }; >+ return { ">": dayjs().subtract(1, 'hour').format() }; > } else { >- return { "<": now.toISOString() }; >+ return { "<": dayjs().format()}; > } > } > }; >-- >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 37905
:
171386
|
171387
|
171388
|
171404
|
171405
|
171759
|
171760
|
171761
|
172902
|
172903
|
172904