Bug 26766

Summary: Don't show star rating in dialog when saving a checkout note
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Nick Clemens <nick>
Severity: minor    
Priority: P5 - low CC: aleisha, lucas, nick
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.06
Attachments: Bug 26766: Correct selection of title during OPAC note confirmation
Bug 26766: Correct selection of title during OPAC note confirmation
Bug 26766: Correct selection of title during OPAC note confirmation

Description Katrin Fischer 2020-10-21 15:30:27 UTC
When CheckoutNotes is enabled and you enter a note for a checkout in the OPAC, it displays the title and "has been saved and sent to the library."

Between the title and the message the ratings appear now, which looks not quite right there.
Comment 1 Katrin Fischer 2020-10-21 15:30:42 UTC
You'll also have to activate star ratings!
Comment 2 Owen Leonard 2020-10-21 17:30:23 UTC
Created attachment 112114 [details] [review]
Bug 26766: Correct selection of title during OPAC note confirmation

This patch modifies the JavaScript in opac-user.tt which executes when
the user submits a checkout note. The script tries to grab the
checkout's title from an earlier cell in the table row so that it can
display it in the confirmation message.

Before start ratings were enabled on this page, the title of each
checked-out item was the only HTML inside this table cell, so it was
necessary only to grab the HTML contents of the <td>. Now that star
ratings might be displayed as well we must make the selection more
specific.

To test, apply the patch and enable both the  OpacStarRatings and
AllowCheckoutNotes preferences.

 - Log in to the OPAC as a user with checkouts.
 - On the "Your summary" page, fill out and submit the "Note" field for
   one of your checkouts.
 - In the confirmation message, confirm that the correct title
   information is displayed as a link to the bibliographic detail page.
Comment 3 David Nind 2020-10-25 01:32:04 UTC
Created attachment 112445 [details] [review]
Bug 26766: Correct selection of title during OPAC note confirmation

This patch modifies the JavaScript in opac-user.tt which executes when
the user submits a checkout note. The script tries to grab the
checkout's title from an earlier cell in the table row so that it can
display it in the confirmation message.

Before start ratings were enabled on this page, the title of each
checked-out item was the only HTML inside this table cell, so it was
necessary only to grab the HTML contents of the <td>. Now that star
ratings might be displayed as well we must make the selection more
specific.

To test, apply the patch and enable both the  OpacStarRatings and
AllowCheckoutNotes preferences.

 - Log in to the OPAC as a user with checkouts.
 - On the "Your summary" page, fill out and submit the "Note" field for
   one of your checkouts.
 - In the confirmation message, confirm that the correct title
   information is displayed as a link to the bibliographic detail page.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Katrin Fischer 2020-10-25 01:43:44 UTC
Created attachment 112447 [details] [review]
Bug 26766: Correct selection of title during OPAC note confirmation

This patch modifies the JavaScript in opac-user.tt which executes when
the user submits a checkout note. The script tries to grab the
checkout's title from an earlier cell in the table row so that it can
display it in the confirmation message.

Before start ratings were enabled on this page, the title of each
checked-out item was the only HTML inside this table cell, so it was
necessary only to grab the HTML contents of the <td>. Now that star
ratings might be displayed as well we must make the selection more
specific.

To test, apply the patch and enable both the  OpacStarRatings and
AllowCheckoutNotes preferences.

 - Log in to the OPAC as a user with checkouts.
 - On the "Your summary" page, fill out and submit the "Note" field for
   one of your checkouts.
 - In the confirmation message, confirm that the correct title
   information is displayed as a link to the bibliographic detail page.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2020-10-25 23:09:58 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 6 Lucas Gass 2020-11-13 21:46:44 UTC
backported to 20.05.x for 20.05.06
Comment 7 Aleisha Amohia 2020-11-17 05:01:24 UTC
enhancement, not backported to 19.11.x