Bug 25340 - opac-review.pl doesn't show title when commenting
Summary: opac-review.pl doesn't show title when commenting
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-01 05:28 UTC by David Cook
Modified: 2020-11-30 21:46 UTC (History)
3 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:
20.05.00, 19.11.06
Circulation function:


Attachments
Bug 25340: Pass biblio object to OPAC comments template (3.66 KB, patch)
2020-05-01 13:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25340: Pass biblio object to OPAC comments template (3.72 KB, patch)
2020-05-01 15:16 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 25340: Pass biblio object to OPAC comments template (3.78 KB, patch)
2020-05-01 15:30 UTC, Katrin Fischer
Details | Diff | Splinter Review

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