Description
Jonathan Druart
2024-09-12 12:49:12 UTC
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 (In reply to Lucas Gass (lukeg) from comment #15) > Backported to 24.05.x for upcoming 24.05.06 But Bug 36217 is not in 24.05.x (In reply to Fridolin Somers from comment #16) > (In reply to Lucas Gass (lukeg) from comment #15) > > Backported to 24.05.x for upcoming 24.05.06 > > But Bug 36217 is not in 24.05.x The underlying problem I was trying to fix with bug 36217 would be though. I think it's been a bug in Koha since the introduction of background jobs. So would still be worth backporting I reckon. |