Bug 13083 - Hard-coded " by " in opac-tags.pl
Summary: Hard-coded " by " in opac-tags.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Target Milestone: ---
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 13121 13119
  Show dependency treegraph
 
Reported: 2014-10-15 11:29 UTC by paxed
Modified: 2015-06-04 23:33 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13083 - Hard-coded " by " in opac-tags.pl (2.90 KB, patch)
2014-10-21 16:09 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 13083 - Hard-coded " by " in opac-tags.pl (2.91 KB, patch)
2014-10-26 02:13 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 13083 - Hard-coded " by " in opac-tags.pl (3.02 KB, patch)
2014-10-26 10:27 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 paxed 2014-10-15 11:29:29 UTC
($biblio->{author}) and $_->{bib_summary} .= " by " . $biblio->{author};
Comment 1 Owen Leonard 2014-10-21 16:09:58 UTC Comment hidden (obsolete)
Comment 2 Frédéric Demians 2014-10-25 12:18:38 UTC
This is OK for MARC21 but won't be that good for UNIMARC: 

- In MARC21, if you have a title and a subtitle, the title (245$a) ends with
  ':', and so your patch will display correctly separated title and subtile.

- In UNIMARC, puncuation characters are not stored in field, ie the title
  doesn't end with a ':'. The display layer is in charge to add punctuation
  characters. That what UNIMARC XSL is doing.

Am I wrong or do you have already proposed a patch to display tagged biblio
records with XSL?
Comment 3 Chris Cormack 2014-10-26 02:13:15 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2014-10-26 10:23:19 UTC
I agree that the display in UNIMARC is not ideal with this patch, but I still believe it to be an improvement over the hardcoded and untranslatable 'by' that was used before.

Also, looking at some other code samples, the UNIMARC display of title + subtitle seems to be a more general problem - so maybe we can fix them all at once in a later patch. 

The XSLT patch from Owen depends on this one.
Comment 5 Katrin Fischer 2014-10-26 10:27:59 UTC
Created attachment 32770 [details] [review]
[PASSED QA] Bug 13083 - Hard-coded " by " in opac-tags.pl

The OPAC's list of a logged-in user's tagged titles displays title and
author, which for some reason are combined in the script into one
variable. I can't see any reason to do it this way.

This patch modifies the script so that title and author are passed as
separate variables. In addition, subtitle is now passed as well.

To test you must log into the OPAC as a user who has tagged multiple
titles, at least one of which should have an author and at least one
with a subtitle. View the list of tagged titles and confirm that this
information is being displayed correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Comment 6 Tomás Cohen Arazi 2014-10-28 13:24:03 UTC
Patch pushed to master.

Thanks Owen!