Bug 38385 - DB updates not displayed properly on the UI
Summary: DB updates not displayed properly on the UI
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks: 38750
  Show dependency treegraph
 
Reported: 2024-11-07 10:32 UTC by Jonathan Druart
Modified: 2024-12-19 11:22 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06
Circulation function:


Attachments
Bug 38385: Improve DB update output on error (UI) (4.29 KB, patch)
2024-11-07 10:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38385: Improve DB update output on error (UI) (4.36 KB, patch)
2024-11-08 19:39 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 38385: Improve DB update output on error (UI) (4.43 KB, patch)
2024-11-12 13:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-11-07 10:32:35 UTC
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)
Comment 1 Jonathan Druart 2024-11-07 10:36:13 UTC
Created attachment 174109 [details] [review]
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;
    };
Comment 2 Emily Lamancusa (emlam) 2024-11-08 19:39:45 UTC
Created attachment 174294 [details] [review]
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 <emily.lamancusa@montgomerycountymd.gov>
Comment 3 Martin Renvoize (ashimema) 2024-11-12 13:30:58 UTC
Created attachment 174410 [details] [review]
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 <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Katrin Fischer 2024-11-12 16:55:46 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 5 Lucas Gass (lukeg) 2024-12-05 22:25:24 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 6 Fridolin Somers 2024-12-18 13:19:13 UTC
Does not apply easy on 23.11.x
I skip since this is for new installs, they should use last version.