https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33206 Bug ID: 33206 Summary: Bad title__sort made of multifield 245 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com In MARC 21, having title search field defined in mappings.yaml as 245abp (more than one subfield), the Koha generated title__sort will have not only $a, but also other subfields cut by ind2 characters, i.e.: 245 04 $a Die Renaissance : $b Architektur, Plastik, Malerei, Illustrationen, Zeichnungen becomes as title__sort: Renaissance : itektur, Plastik, Malerei, Illustrationen, Zeichnungen instead of: Renaissance : Architektur, Plastik, Malerei, Illustrationen, Zeichnungen This is because copying an array of pointers in Perl causes you to point to the same (anonymous) element. Therefore, the intended modification only for subfield "a" (Koha/SearchEngine/Elasticsearch.pm, ~line 1157) causes in fact modification for all the subfields sharing the same mapping definition and introduction of the nonfiling_characters_indicator to all subfields 245 when processing 245abp. And this is obviously not what is intended. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.