From 116fec70982e8e8119f4ef9dbec7361874344167 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 7 Nov 2024 11:33:03 +0100 Subject: [PATCH] Bug 38385: Improve DB update output on error (UI) When an error occurred during the DB update the UI is not correct. 1. say_success, say_info, etc. show the span tags and are not colored 2. "Everything went okay" shown even if atomic updates failed 3. The same error can be displayed several time (see https://snipboard.io/IGiKgM.jpg) Test plan: Create a new db rev and/or atomic update Have some say_* statement to render messages, and raise an error For instance: say_info( $out, "Use blue for further information" ); try { say_warning( $out, "Use yellow for warning/a call to action" ); $dbh->do(q{}); } catch { say_failure( $out, "Use red for danger/failure" ); $_->rethrow; }; Signed-off-by: Emily Lamancusa Signed-off-by: Martin Renvoize --- .../prog/en/modules/installer/step3.tt | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt index 63b2ba19b63..f6dd94594dc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt @@ -419,16 +419,15 @@
    [% FOR e IN error %] [% FOR o IN e.output %] -
  • - [% o | html %] -
    - ERROR: [% e.error | $raw %] - - [% IF e.output.size > 1 %] - [% IF loop.first %]
      [% ELSIF loop.last %]
    [% END %] - [% END %] -
  • + [% o | $raw %] +
    + [% IF e.output.size > 1 %] + [% IF loop.first %]
      [% ELSIF loop.last %]
    [% END %] + [% END %] [% END %] +
  • + ERROR: [% e.error | $raw %] +
  • [% END %]
[% END %] @@ -439,21 +438,20 @@
    [% FOR e IN atomic_updates.error %] [% FOR o IN e.output %] -
  • - [% o | html %] -
    - ERROR: [% e.error | $raw %] - - [% IF e.output.size > 1 %] - [% IF loop.first %]
      [% ELSIF loop.last %]
    [% END %] - [% END %] -
  • + [% o | $raw %] +
    + [% IF e.output.size > 1 %] + [% IF loop.first %]
      [% ELSIF loop.last %]
    [% END %] + [% END %] [% END %] +
  • + ERROR: [% e.error | $raw %] +
  • [% END %]
[% END %] - [% UNLESS error OR has_update_errors %] + [% UNLESS error OR atomic_updates.error OR has_update_errors %]

Everything went okay. Update done.

Continue to log in to Koha

[% ELSE %] -- 2.47.0