See bug 36217 for more info, and especially the last comments. We want to revert what has been pushed and fix it properly with 2 lines of JS.
Created attachment 171386 [details] [review] Revert "Bug 36217: Fix background jobs page's include_last_hour filter" This reverts commit f5c839348091d129bb7100af2c9e64e486d0ea1d.
Created attachment 171387 [details] [review] Bug 37905: Use the server's tz to limit the jobs by "enqueued in the last hour" 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. I have noticed a couple of things when working on this: * We cannot pass a RFC3339 formatted date to the server (will open a separate bug report) * toISOString() and the handling of timezone in dayjs is ambiguous or buggy https://github.com/iamkun/dayjs/issues/2720 https://github.com/iamkun/dayjs/issues/2611 With bug 37831 with simply need to pass a rfc3339-formatted date and the filtering will be done as expected.
Created attachment 171388 [details] [review] Bug 37905: Fix parameter name It's named enqueued_date on the API side, not enqueued_on (which is the DB column's name) No behaviour change expected here.
Created attachment 171404 [details] [review] 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.
Created attachment 171405 [details] [review] Bug 37905: Fix parameter name It's named enqueued_date on the API side, not enqueued_on (which is the DB column's name) No behaviour change expected here.
Created attachment 171759 [details] [review] Revert "Bug 36217: Fix background jobs page's include_last_hour filter" This reverts commit f5c839348091d129bb7100af2c9e64e486d0ea1d. https://bugs.koha-community.org/show_bug.cgi?id=37905 Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 171760 [details] [review] 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. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 171761 [details] [review] Bug 37905: Fix parameter name It's named enqueued_date on the API side, not enqueued_on (which is the DB column's name) No behaviour change expected here. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
All works on top of 37902 - filtering as expected
Created attachment 172902 [details] [review] Revert "Bug 36217: Fix background jobs page's include_last_hour filter" This reverts commit f5c839348091d129bb7100af2c9e64e486d0ea1d. https://bugs.koha-community.org/show_bug.cgi?id=37905 Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 172903 [details] [review] 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. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 172904 [details] [review] Bug 37905: Fix parameter name It's named enqueued_date on the API side, not enqueued_on (which is the DB column's name) No behaviour change expected here. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
So glad to see this one through.. working great and considerably cleaner. Passing QA.. thanks Jonathan!
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.06