https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 --- Comment #2 from Community Sandboxes <sandboxes@biblibre.com> --- Created attachment 208553 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208553&action=edit Bug 43860: Show cataloging search results data in ISBD order In the cataloging search results (cataloguing/addbooks.pl) the line under the title showed the bibliographic data in an arbitrary order: Author - ISBN - Year - Publisher - Copyright Edition: X; Place - Extent; Size and the separators added by the template duplicated the ISBD punctuation usually catalogued in the subfields (264$a "New York :", 264$b "Vision,", 300$a "501 p. ;"), at the end of a subfield or at the start of the next one (264$b ": Publisher", 300$c "; 30 cm"). This patch shows the data following the order of the ISBD areas: Author - Edition: X - Place : Publisher, Date - Extent ; Size - ISBN - The publication area is grouped as "Place : Publisher, Date", with separators only between the elements that are present, and wrapped in <span class="results_publication">. - copyrightdate is only shown if it differs from publicationyear. - Size is preceded by " ; " if there is an extent, or by "- " if not. - ISBN goes at the end. - Leading and trailing ISBD punctuation is stripped from each element before building the line, so it is not duplicated. The separators are built inside TT directives so that the template tidy does not strip their surrounding spaces. Steps to follow: 1. Make sure some records have publication data with catalogued ISBD punctuation, e.g. 264 _1 $a New York, NY : $b Vision, and 300 $a 501 p. ; $c 19 cm. (the date is only shown if the subfield used is mapped to biblio.copyrightdate, 260$c by default). 2. Cataloging > search for those records. Look at the line under the title: the ISBN comes first, the place is shown after the edition, the edition is glued to the previous element and the punctuation is duplicated (e.g. "New York, NY : - 501 p. ; ; 19 cm."). 3. Edit a record so that 264$b (or 260$b) starts with ": " and 300$c starts with "; ", and remove 300$a. Reindex the record if your test environment does not do it automatically (e.g. misc/search_tools/rebuild_elasticsearch.pl -b --bnumber <biblionumber>, or check that koha-es-indexer / the Zebra daemon is running). Search again: you see "- : Publisher" and "; 30 cm". 4. Apply the patch (no restart needed, it is a template change). 5. Repeat the searches. The line now reads Author - Edition: X - Place : Publisher, Date - Extent ; Size - ISBN with no duplicated punctuation, and the record from step 3 shows "- Publisher - 30 cm". 6. Check a record with only a publisher (no place) and one with no publication data at all: no stray separators are shown. 7. Put a value with & or quotes in 264$b, reindex the record as in step 3 and check it is displayed correctly. Signed-off-by: Adolfo Rodríguez <adolfo.rodriguez@xercode.es> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Gretchen Maxeiner <maxeinergl@gcc.edu> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.