Bug 25340

Summary: opac-review.pl doesn't show title when commenting
Product: Koha Reporter: David Cook <dcook>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: joy, lucas, sally.healey
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.06
Attachments: Bug 25340: Pass biblio object to OPAC comments template
Bug 25340: Pass biblio object to OPAC comments template
Bug 25340: Pass biblio object to OPAC comments template

Description David Cook 2020-05-01 05:28:19 UTC
When placing a comment/review on a record on the OPAC, Koha says "Comments on No title" even when there is a title.

The template looks like this:

<h1>Comments on <i>[% INCLUDE 'biblio-title.inc' biblio=Stash.stash() %]</i></h1>

Surely that should have a more appropriate data structure put into biblio.
Comment 1 Owen Leonard 2020-05-01 13:05:00 UTC
Created attachment 104086 [details] [review]
Bug 25340: Pass biblio object to OPAC comments template

This patch modifies the OPAC comments system so that the biblio object
is passed to the template. This allows the biblio-title include to
properly access the title and subtitle information.

Unrelated change: Remove some custom CSS from the page which was
obsolete.

To test, apply the patch and make sure the "reviewson" preference is
enabled.

- Log in to the OPAC and open a bibliographic record's detail page.
- Under the "Comments" tab, click the "Post your comments" link to
  trigger the pop-up window.
- In the pop-up window, verify that the item's title is correct in the
  page title and the heading. Author should display correctly, if
  present.
- Test submitting a comment and editing a comment. Everything should
  work correctly.
Comment 2 PTFS Europe Sandboxes 2020-05-01 15:16:48 UTC
Created attachment 104113 [details] [review]
Bug 25340: Pass biblio object to OPAC comments template

This patch modifies the OPAC comments system so that the biblio object
is passed to the template. This allows the biblio-title include to
properly access the title and subtitle information.

Unrelated change: Remove some custom CSS from the page which was
obsolete.

To test, apply the patch and make sure the "reviewson" preference is
enabled.

- Log in to the OPAC and open a bibliographic record's detail page.
- Under the "Comments" tab, click the "Post your comments" link to
  trigger the pop-up window.
- In the pop-up window, verify that the item's title is correct in the
  page title and the heading. Author should display correctly, if
  present.
- Test submitting a comment and editing a comment. Everything should
  work correctly.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Katrin Fischer 2020-05-01 15:30:41 UTC
Created attachment 104116 [details] [review]
Bug 25340: Pass biblio object to OPAC comments template

This patch modifies the OPAC comments system so that the biblio object
is passed to the template. This allows the biblio-title include to
properly access the title and subtitle information.

Unrelated change: Remove some custom CSS from the page which was
obsolete.

To test, apply the patch and make sure the "reviewson" preference is
enabled.

- Log in to the OPAC and open a bibliographic record's detail page.
- Under the "Comments" tab, click the "Post your comments" link to
  trigger the pop-up window.
- In the pop-up window, verify that the item's title is correct in the
  page title and the heading. Author should display correctly, if
  present.
- Test submitting a comment and editing a comment. Everything should
  work correctly.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 David Cook 2020-05-03 23:13:44 UTC
Thanks, Owen :). I was flat out last week and didn't have time to do this one.
Comment 5 Martin Renvoize 2020-05-04 07:55:42 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-05-11 20:36:17 UTC
Backported to 19.11.x for 19.11.06
Comment 7 Lucas Gass 2020-05-15 20:14:59 UTC
When I rebase this for 19.05.x I am running into problems. Perhaps I'm not rebasing it correctly. If this is needed in 19.05.x please rebase since I cannot.