[Bug 43860] New: Cataloging search results: bibliographic data shown in arbitrary order, not following ISBD
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 Bug ID: 43860 Summary: Cataloging search results: bibliographic data shown in arbitrary order, not following ISBD Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: adolfo.rodriguez@xercode.es QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Target Milestone: --- In the cataloging search results (Cataloging > search box, cataloguing/addbooks.pl), the line under the title shows the bibliographic data in an arbitrary order that does not follow ISBD, and with inconsistent punctuation: Author - ISBN - Year - Publisher - Copyright Edition: X; Place - Extent; Size - The ISBN comes before the publication data. - The place of publication is separated from the publisher and shown after the edition. - The edition statement is glued to the previous element, with no separator. - The year is repeated when copyrightdate is the same as publicationyear. - If there is no extent, the size starts with ";". On top of that, MARC subfields usually carry the ISBD punctuation that was catalogued (264$a "New York, NY :", 264$b "Vision,", 300$a "501 p. ;"), so the separators added by the template duplicate it. Some records have the punctuation at the start of the next subfield instead (264$b ": Publisher", 300$c "; 30 cm"), with the same result. Example (MARC21, 264 _1 $a New York, NY : $b Vision, / 250 $a First oversize mass market edition. / 300 $a 501 p. ; $c 19 cm.): Connelly, Michael. - 9781455524181 - Vision, Edition: First oversize mass market edition. ; New York, NY : - 501 p. ; ; 19 cm. The display has not changed since the templates were moved to Template Toolkit (bug 5917). Bug 15649 already pointed out display problems on this page, and comment #1 there says "The whole display should be revised". Proposal: show 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, wrapped in <span class="results_publication"> so it can be styled. - copyrightdate is only shown if it differs from publicationyear. - Size is preceded by " ; " if there is an extent, or by "- " if there is not. - ISBN at the end. - Leading and trailing ISBD punctuation (: ; , / = and spaces; also "." on dates and "+" on extent/size) is stripped from each element before building the line, so the template does not duplicate it. Same record with the proposal: Connelly, Michael. - Edition: First oversize mass market edition. - New York, NY : Vision - 501 p. ; 19 cm. - 9781455524181 This is a template-only change (cataloguing/addbooks.tt), with no Perl or data changes. It has been validated on the staging server of a Spanish library network. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 --- Comment #1 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Created attachment 208532 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208532&action=edit Bug 43860: Show cataloging search results data in ISBD order Patch attached. It is a template-only change (cataloguing/addbooks.tt); the test plan is in the commit message. Note: the separators are built inside TT directives, because misc/devel/tidy.pl strips the spaces around literal text between directives (" : " would become ":"). Correction to the description: "comment #1 there" refers to bug 15649 comment 1, not to this bug. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 Community Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #208532|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 Community Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #3 from Community Sandboxes <sandboxes@biblibre.com> --- Signed off using a sandbox -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 Gretchen Maxeiner <maxeinergl@gcc.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxeinergl@gcc.edu --- Comment #4 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- This is a nice improvement and everything worked as per the test plan. The order of elements was as expected, punctuation was as expected, there were no issues with quotes or ampersands, and absent subfields did not throw off the expected punctuation. There are three small things I noticed that might be considered here. 1. ISBNs often have terminal punctuation of : in $a when there is a $c. It would be nice to strip this since it is more obvious in the current display. Example: 0198709862 (pbk.) : 2. In instances where there are repeating subfields, Koha supplies a pipe (|). It might be better to drop terminal punctuation from the subfield ahead of a pipe. Example: Harmondsworth ; | Baltimore : Penguin, 1974... 3. In instances where there are multiple $a's (place of publication) and $b's (publisher/distributor) in a 260/264, or multiple 264s because of different roles, Koha currently groups those by subfield, losing the natural order and relationships between place and company. It was like this pre-patch as well but if we wish to follow ISBD this could potentially be upgraded. Example 1 (sandbox record #28) 260 _ _ ‡aNew York :‡bArcade Pub. in association with Riverrun Press ;‡a[Boston, Mass.] :‡bDistributed by Little, Brown and Co.,‡c1993. New display Beckett, Samuel, - Edition: 1st North American ed. - New York : | [Boston, Mass.] : Arcade Pub. in association with Riverrun Press ; | Distributed by Little, Brown and Co., 1993 - xx, 241 p. ; 22 cm. - 1559702176 : Example 2 (a built record) 264 _ 1 ‡aStockholm, Sweden :‡bBokförlaget Stolpe,‡c2026. 264 _ 2 ‡aNew Haven :‡bdistributed by Yale University Press New display - Stockholm, Sweden : | New Haven : Bokförlaget Stolpe, | distributed by Yale University Press, 2026 Sample from ISBD (page 120) . — Place of publication : name of publisher ; place of production : name of producer, date ; place of distribution : name of distributor, date These were all present already in the original search results display so I only mention in case you wish to address them in this work. Overall the display is so much better! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #208553|0 |1 is obsolete| | --- Comment #5 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Created attachment 208564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208564&action=edit Bug 43860: Show cataloging search results data in ISBD order -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff --- Comment #6 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Thanks a lot for testing and for the detailed feedback, Gretchen! The new version of the patch covers your points 1 and 2: 1. The ISBN is now cleaned the same way as the other elements, so "0198709862 (pbk.) :" is shown as "0198709862 (pbk.)". 2. When a subfield is repeated, Koha joins the values with " | ". The punctuation is now stripped from each value, not only from both ends of the whole string: "Harmondsworth ; | Baltimore : Penguin, 1974" is now shown as "Harmondsworth | Baltimore : Penguin, 1974". Your example 1 is now displayed as: Beckett, Samuel, - Edition: 1st North American ed. - New York | [Boston, Mass.] : Arcade Pub. in association with Riverrun Press | Distributed by Little, Brown and Co., 1993 - xx, 241 p. ; 22 cm. - 1559702176 I added a step 8 to the test plan for these cases. The output for all the previous cases is the same as in the signed-off version. Point 3 (pairing each place with its publisher, and following the ISBD order across 260/264 fields with different functions) needs changes on the Perl side, because the template only receives place and publishercode already joined by subfield. I will open a separate bug for it once this one has been approved and pushed, so that it can build on top of it. Sorry for having to ask you to test again. Have a nice day. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 Community Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #208564|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 --- Comment #7 from Community Sandboxes <sandboxes@biblibre.com> --- Created attachment 208575 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208575&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. When a field is repeated, Koha joins the values with " | ", so the punctuation is stripped from each value (e.g. 260$a "Harmondsworth ; | Baltimore :" is shown as "Harmondsworth | Baltimore"). - The ISBN is cleaned the same way (020$a "0198709862 (pbk.) :" is shown as "0198709862 (pbk.)"). 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. 8. Edit a record with repeated subfields and ISBD punctuation, e.g. 260 $a New York : $b Arcade Pub. ; $a [Boston, Mass.] : $b Little, Brown, $c 1993, and 020 $a 1559702176 : $c $20.00, and reindex it. Check that the punctuation is stripped from each value before the " | " ("New York | [Boston, Mass.] : Arcade Pub. | Little, Brown, 1993") and that the ISBN is shown without the final ":". 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 Community Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #8 from Community Sandboxes <sandboxes@biblibre.com> --- Signed off using a sandbox -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 --- Comment #9 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- The new step 8 elements all look correct. All seems good! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |lucas@bywatersolutions.com |y.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43860 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement improves release notes| |the bibliographic details | |shown under each title in | |the cataloging search | |results (Cataloging > | |search box). The details | |now | |follow the ISBD order and | |punctuation: | | | | Author - Edition - Place | |: Publisher, Date - Extent | |; Size - ISBN | | | |Before: the details were | |shown in an arbitrary order | |(ISBN first, place of | |publication after the | |edition, edition glued to | |the previous element), and | |the ISBD punctuation | |already catalogued in the | |subfields was duplicated, | |for | |example: | | Connelly, Michael. - | |9781455524181 - Vision, | |Edition: First oversize | |mass market edition. ; New | |York, NY : - 501 p. ; ; 19 | |cm. | | | |After: | | Connelly, Michael. - | |Edition: First oversize | |mass market edition. - New | |York, NY : Vision - 501 p. | |; 19 cm. - 9781455524181 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org