Bug 35813

Summary: When placing a booking, we should feedback successful placements
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: CirculationAssignee: Martin Renvoize <martin.renvoize>
Status: Needs documenting --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall, oleonard, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00
Bug Depends on: 36374    
Bug Blocks:    
Attachments: Bbug 35813: Add success feedback after placing/editing bookings
Bug 35813: Add success feedback after placing/editing bookings
Bug 35813: (follow-up) Correct dialog class and clean up whitespace
Bug 35813: Add success feedback after placing/editing bookings
Bug 35813: (follow-up) Correct dialog class and clean up whitespace
Bug 35813: Add success feedback after placing/editing bookings
Bug 35813: (follow-up) Correct dialog class and clean up whitespace
Bug 35813: Migrate 'transient_result' to 'messages.inc'
Bug 35813: Add success feedback after placing/editing bookings
Bug 35813: (follow-up) Correct dialog class and clean up whitespace
Bug 35813: Migrate 'transient_result' to 'messages.inc'
Bug 35813: Add success feedback after placing/editing bookings
Bug 35813: (follow-up) Correct dialog class and clean up whitespace
Bug 35813: Migrate 'transient_result' to 'messages.inc'

Description Martin Renvoize 2024-01-15 16:25:51 UTC
We lost this during various rebases I think.. we should let the end user know that the booking was placed successfully rather than just close the modal without any feedback.
Comment 1 Martin Renvoize 2024-01-15 16:49:40 UTC
Created attachment 161048 [details] [review]
Bbug 35813: Add success feedback after placing/editing bookings

This patch restores the lost behaviour that a successful add/edit of a
booking via the 'Place booking' modal should notify the end user that
the submission was sucessful.

Test plan
1) Set an item as bookable to expose the 'Place booking' button
2) Place a new booking from the following pages and confirm that you now
   recieve feedback.
   * Catalog > Title > Details
   * Catalog > Title > MARC details
   * Catalog > Title > ISBD details
   * Catalog > Title > Item details
   * Catalog > Title > Bookings
3) Edit a booking on the 'Catalog > Title > Bookings' page and confirm
   you now recieve feedback.
Comment 2 Martin Renvoize 2024-01-15 16:51:07 UTC
I'm sure this could be prettier.. and I wasn't sure whether the new feedback should disappear after a short timeout.  We don't have any form of feedback on modals like this as yet.. we need to come up with a pattern and best practice.
Comment 3 Owen Leonard 2024-01-16 12:22:43 UTC
Created attachment 161058 [details] [review]
Bug 35813: Add success feedback after placing/editing bookings

This patch restores the lost behaviour that a successful add/edit of a
booking via the 'Place booking' modal should notify the end user that
the submission was sucessful.

Test plan
1) Set an item as bookable to expose the 'Place booking' button
2) Place a new booking from the following pages and confirm that you
   now recieve feedback.
   * Catalog > Title > Details
   * Catalog > Title > MARC details
   * Catalog > Title > ISBD details
   * Catalog > Title > Item details
   * Catalog > Title > Bookings
3) Edit a booking on the 'Catalog > Title > Bookings' page and confirm
   you now recieve feedback.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Owen Leonard 2024-01-16 12:22:45 UTC
Created attachment 161059 [details] [review]
Bug 35813: (follow-up) Correct dialog class and clean up whitespace

This patch changes the class of the success message from "success"
(which is a Bootstrap class) to "message" which is the class we use
elsewhere in Koha for this kind of informational message.

The patch adds the same dialog markup to labeledMARCdetail.tt.

The patch also trims trailing whitespace from place_booking_modal.js
Comment 5 Martin Renvoize 2024-01-17 07:18:02 UTC
Thanks Owen :)
Comment 6 Martin Renvoize 2024-01-17 10:31:54 UTC
Created attachment 161086 [details] [review]
Bug 35813: Add success feedback after placing/editing bookings

This patch restores the lost behaviour that a successful add/edit of a
booking via the 'Place booking' modal should notify the end user that
the submission was sucessful.

Test plan
1) Set an item as bookable to expose the 'Place booking' button
2) Place a new booking from the following pages and confirm that you
   now recieve feedback.
   * Catalog > Title > Details
   * Catalog > Title > MARC details
   * Catalog > Title > ISBD details
   * Catalog > Title > Item details
   * Catalog > Title > Bookings
3) Edit a booking on the 'Catalog > Title > Bookings' page and confirm
   you now recieve feedback.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 7 Martin Renvoize 2024-01-17 10:31:57 UTC
Created attachment 161087 [details] [review]
Bug 35813: (follow-up) Correct dialog class and clean up whitespace

This patch changes the class of the success message from "success"
(which is a Bootstrap class) to "message" which is the class we use
elsewhere in Koha for this kind of informational message.

The patch adds the same dialog markup to labeledMARCdetail.tt.

The patch also trims trailing whitespace from place_booking_modal.js

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Jonathan Druart 2024-01-23 08:43:07 UTC
Bug 34862 is going to make sure we have "messages.inc" included everywhere (the context is CSRF token alert there). It would be nice to have this #transient_result node moved to this include file.
Comment 9 Martin Renvoize 2024-01-24 07:25:24 UTC
Sounds like a great plan to me, I'll code it up now on its own bug linked to here and 34862
Comment 10 Martin Renvoize 2024-02-19 09:51:38 UTC
Created attachment 162263 [details] [review]
Bug 35813: Add success feedback after placing/editing bookings

This patch restores the lost behaviour that a successful add/edit of a
booking via the 'Place booking' modal should notify the end user that
the submission was sucessful.

Test plan
1) Set an item as bookable to expose the 'Place booking' button
2) Place a new booking from the following pages and confirm that you
   now recieve feedback.
   * Catalog > Title > Details
   * Catalog > Title > MARC details
   * Catalog > Title > ISBD details
   * Catalog > Title > Item details
   * Catalog > Title > Bookings
3) Edit a booking on the 'Catalog > Title > Bookings' page and confirm
   you now recieve feedback.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 11 Martin Renvoize 2024-02-19 09:51:40 UTC
Created attachment 162264 [details] [review]
Bug 35813: (follow-up) Correct dialog class and clean up whitespace

This patch changes the class of the success message from "success"
(which is a Bootstrap class) to "message" which is the class we use
elsewhere in Koha for this kind of informational message.

The patch adds the same dialog markup to labeledMARCdetail.tt.

The patch also trims trailing whitespace from place_booking_modal.js

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2024-02-19 09:51:43 UTC
Created attachment 162265 [details] [review]
Bug 35813: Migrate 'transient_result' to 'messages.inc'

This patch DRY's out the code by migrating the transient_result div into
the now widely included messages.inc include.
Comment 13 Martin Renvoize 2024-03-20 16:38:52 UTC
Created attachment 163561 [details] [review]
Bug 35813: Add success feedback after placing/editing bookings

This patch restores the lost behaviour that a successful add/edit of a
booking via the 'Place booking' modal should notify the end user that
the submission was sucessful.

Test plan
1) Set an item as bookable to expose the 'Place booking' button
2) Place a new booking from the following pages and confirm that you
   now recieve feedback.
   * Catalog > Title > Details
   * Catalog > Title > MARC details
   * Catalog > Title > ISBD details
   * Catalog > Title > Item details
   * Catalog > Title > Bookings
3) Edit a booking on the 'Catalog > Title > Bookings' page and confirm
   you now recieve feedback.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 14 Martin Renvoize 2024-03-20 16:38:54 UTC
Created attachment 163562 [details] [review]
Bug 35813: (follow-up) Correct dialog class and clean up whitespace

This patch changes the class of the success message from "success"
(which is a Bootstrap class) to "message" which is the class we use
elsewhere in Koha for this kind of informational message.

The patch adds the same dialog markup to labeledMARCdetail.tt.

The patch also trims trailing whitespace from place_booking_modal.js

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 15 Martin Renvoize 2024-03-20 16:38:57 UTC
Created attachment 163563 [details] [review]
Bug 35813: Migrate 'transient_result' to 'messages.inc'

This patch DRY's out the code by migrating the transient_result div into
the now widely included messages.inc include.
Comment 16 Martin Renvoize 2024-03-20 16:39:43 UTC
Trivial rebase to put it after the js tidy patch in the queue.
Comment 17 Kyle M Hall 2024-05-10 15:15:39 UTC
Created attachment 166579 [details] [review]
Bug 35813: Add success feedback after placing/editing bookings

This patch restores the lost behaviour that a successful add/edit of a
booking via the 'Place booking' modal should notify the end user that
the submission was sucessful.

Test plan
1) Set an item as bookable to expose the 'Place booking' button
2) Place a new booking from the following pages and confirm that you
   now recieve feedback.
   * Catalog > Title > Details
   * Catalog > Title > MARC details
   * Catalog > Title > ISBD details
   * Catalog > Title > Item details
   * Catalog > Title > Bookings
3) Edit a booking on the 'Catalog > Title > Bookings' page and confirm
   you now recieve feedback.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 18 Kyle M Hall 2024-05-10 15:15:46 UTC
Created attachment 166580 [details] [review]
Bug 35813: (follow-up) Correct dialog class and clean up whitespace

This patch changes the class of the success message from "success"
(which is a Bootstrap class) to "message" which is the class we use
elsewhere in Koha for this kind of informational message.

The patch adds the same dialog markup to labeledMARCdetail.tt.

The patch also trims trailing whitespace from place_booking_modal.js

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 19 Kyle M Hall 2024-05-10 15:15:48 UTC
Created attachment 166581 [details] [review]
Bug 35813: Migrate 'transient_result' to 'messages.inc'

This patch DRY's out the code by migrating the transient_result div into
the now widely included messages.inc include.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 20 Katrin Fischer 2024-05-13 08:49:03 UTC
We need the double underscore in a .js file, fixed inline.

+                    _("Booking successfully updated") +
Comment 21 Katrin Fischer 2024-05-13 12:02:20 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 22 Fridolin Somers 2024-05-29 12:10:28 UTC
Depends on Bug 36374 not in 23.11.1x