From 74cf164d32165dbcb96449cae28514213599db1e Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 1 Jun 2026 13:37:21 +0000 Subject: [PATCH] Bug 42733: Job progress fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit waitForJobFinished previously had no handling for failed jobs or non-200 responses — if the job API returned anything unexpected, the recursive cy.wait() would silently stall waiting for a 2nd poll that never came, producing a confusing timeout. Adds an explicit "failed" status check and updates the intercept to reproduce the exact CI failure (Apache returning 503 during reset_all). Signed-off-by: Jonathan Druart Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/js/job_progress.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/job_progress.js b/koha-tmpl/intranet-tmpl/prog/js/job_progress.js index 506effa124..6f61a42510 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/job_progress.js +++ b/koha-tmpl/intranet-tmpl/prog/js/job_progress.js @@ -47,5 +47,9 @@ function updateProgress(job_id, callbacks) { updateProgress(job_id, callbacks); }, 1 * 1000); } + }).fail(function () { + setTimeout(function () { + updateProgress(job_id, callbacks); + }, 1 * 1000); }); }