From 5a5536c4362752433f4412dd91f8587c7a6fe253 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 6 Sep 2022 12:44:39 +0000 Subject: [PATCH] Bug 27421: (QA follow-up) Add redirection to job details Low budget implementation. After 5 seconds we jump to jobs. Small jobs should already be finished. Test plan: Try staging a file. Wait and see if you got redirected. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/tools/manage-marc-import.tt | 8 +++++++- .../prog/en/modules/tools/stage-marc-import.tt | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index 2efba77b09..85e34fb091 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -77,7 +77,7 @@ [% IF job_enqueued %]

The job has been enqueued! It will be processed as soon as possible.

-

View detail of the enqueued job +

View detail of the enqueued job

[% ELSIF ( label_batch_msg ) %] @@ -608,6 +608,12 @@ return confirm(_("Clear all reservoir records staged in this batch? This cannot be undone.")); } }); + [% IF job_enqueued %] + setTimeout( + function() { window.location.href=$('a.job_details').attr('href'); }, + 5000, // 5 secs to read + ); + [% END %] }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt index 5049140329..8a23682952 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt @@ -74,7 +74,7 @@

MARC staging

The job has been enqueued! It will be processed as soon as possible.

-

View detail of the enqueued job +

View detail of the enqueued job

[% ELSE %]

Stage MARC records for import

@@ -421,6 +421,12 @@ alert(_("An error occurred")+"\n\n"+((error.responseJSON && error.responseJSON.error) || error.responseText || error.statusText)); }) }); + [% IF job_enqueued %] + setTimeout( + function() { window.location.href=$('a.job_details').attr('href'); }, + 5000, // 5 secs to read + ); + [% END %] }); function StartUpload() { -- 2.39.5