Summary: | multiple semi-colons in series part name ($p) | ||
---|---|---|---|
Product: | Koha | Reporter: | Bernard <bernard.scaife> |
Component: | OPAC | Assignee: | Owen Leonard <oleonard> |
Status: | Needs Signoff --- | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | alexander.wagner |
Version: | 25.05 | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: | Bug 40300: Add chop punctuation to PartName () in Part xslt templates |
Description
Bernard
2025-07-03 10:28:22 UTC
Created attachment 183742 [details] [review] Bug 40300: Add chop punctuation to PartName () in Part xslt templates 1. Add series field 830 with $a Analecta Gregoriana, Series Facultatis Philosophiae. $p Sectio B ; $v n. 14. 2. Observe OPAC or intranet detail record: Analecta Gregoriana, Series Facultatis Philosophiae. Sectio B ; ; n. 14. 3. Apply patch and restart_all 4. Observe OPAC or intranet detail record again - should be Analecta Gregoriana, Series Facultatis Philosophiae. Sectio B ; n. 14. Probably a bit philosophical: While I am personally all for removing punctuation from records and adding them automatically, I do wonder if in your case Koha is not entering a strange mixture. IMHO - if a punctuation _is there_ the logic should be to keep and use it. - if no punctuation is there it should add it. IOW while I see what your code does and I also perfectly agree that having ` ; ; ` is wrong _and_ ugly, I do wonder why the ` ; ` in `|p` is different from the `.` in `|a` or `|v` and thus treated differently. So, I think instead of chopping the punctuation from `|p` and add it again automatically, the code should look at leader 18 and decide if it should do anything wrt the punctuation in the first place. And if the leader says "all chars are there" it should just do nothing and leave it as is. (My guess would be your records states that it holds those chars.) BTW: I started working on automatic punctuation in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21303. After playing around with XSLT and some discussion with Cait we came to the conclusion (which might be wrong) that it is probably _a lot_ easier to do this punctuation stuff by means of a Marc Filter in Perl especially as there are some complex things out there. Cf https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37196, https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37325 and their tests for examples and an implementation for a few fields. |