Bug 35813 - When placing a booking, we should feedback successful placements
Summary: When placing a booking, we should feedback successful placements
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 36374
Blocks:
  Show dependency treegraph
 
Reported: 2024-01-15 16:25 UTC by Martin Renvoize
Modified: 2024-03-20 16:39 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bbug 35813: Add success feedback after placing/editing bookings (5.65 KB, patch)
2024-01-15 16:49 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35813: Add success feedback after placing/editing bookings (5.68 KB, patch)
2024-01-16 12:22 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 35813: (follow-up) Correct dialog class and clean up whitespace (12.54 KB, patch)
2024-01-16 12:22 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 35813: Add success feedback after placing/editing bookings (5.69 KB, patch)
2024-01-17 10:31 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35813: (follow-up) Correct dialog class and clean up whitespace (12.60 KB, patch)
2024-01-17 10:31 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35813: Add success feedback after placing/editing bookings (5.81 KB, patch)
2024-02-19 09:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35813: (follow-up) Correct dialog class and clean up whitespace (3.61 KB, patch)
2024-02-19 09:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35813: Migrate 'transient_result' to 'messages.inc' (5.43 KB, patch)
2024-02-19 09:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35813: Add success feedback after placing/editing bookings (5.78 KB, patch)
2024-03-20 16:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35813: (follow-up) Correct dialog class and clean up whitespace (3.01 KB, patch)
2024-03-20 16:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35813: Migrate 'transient_result' to 'messages.inc' (5.47 KB, patch)
2024-03-20 16:38 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.