From bdb394b1cef446c6a284656d4f0c0d428d9a33a8 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 6 Sep 2022 12:14:02 +0000 Subject: [PATCH] Bug 27421: (QA follow-up) Template polishing Content-Type: text/plain; charset=utf-8 The completed alert needs a condition on status. The record_type variable needs a bit of 'context'. Test plan: Verify if a failed or new job does not have a Completed alert. Signed-off-by: Marcel de Rooy --- .../includes/background_jobs/marc_import_commit_batch.inc | 4 +++- .../includes/background_jobs/marc_import_revert_batch.inc | 4 +++- .../en/includes/background_jobs/stage_marc_for_import.inc | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/marc_import_commit_batch.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/marc_import_commit_batch.inc index 3d358f9b83..8d830990cc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/marc_import_commit_batch.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/marc_import_commit_batch.inc @@ -3,7 +3,9 @@ [% BLOCK report %] [% SET report = job.report %] [% IF report %] -
Completed import of records
+ [% IF job.status == 'finished' %] +
Completed import of records
+ [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/marc_import_revert_batch.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/marc_import_revert_batch.inc index 0ba816ddaf..1a849c3134 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/marc_import_revert_batch.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/marc_import_revert_batch.inc @@ -3,7 +3,9 @@ [% BLOCK report %] [% SET report = job.report %] [% IF report %] -
Success: Import reverted
+ [% IF job.status == 'finished' %] +
Success: Import reverted
+ [% END %]
Number of records added
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/stage_marc_for_import.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/stage_marc_for_import.inc index 0347d2d37f..4336b3df11 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/stage_marc_for_import.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/stage_marc_for_import.inc @@ -3,8 +3,12 @@ [% BLOCK report %] [% SET report = job.report %] [% IF report %] + [% IF job.status == 'finished' %] +
Completed staging records
+ [% END %] +

MARC staging results

- [% SWITCH (record_type) %] + [% SWITCH job.decoded_data.record_type %] [% CASE 'biblio' %]

Processing bibliographic records

[% CASE 'auth' %] -- 2.20.1
Number of records deleted