[Bug 21453] New: blinddetail-biblio-search.pl/.tt use hardcoded subfield values for MARC21
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Bug ID: 21453 Summary: blinddetail-biblio-search.pl/.tt use hardcoded subfield values for MARC21 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: MARC Authority data support Assignee: koha-bugs@lists.koha-community.org Reporter: arouss1980@gmail.com QA Contact: testopia@bugs.koha-community.org If you add or alter an authority record and edit one of the MARC fields in UNIMARC 5XX 'See Also Reference Tracing Block' [1], you can click on the ellipsis (...) next to a subfield [2] to launch the authority finder plugin. This plugin allows you to search for an authority and then pick an entry from the 'Special relationship:' dropdown menu in order to set the relationship between the two authorities. The results list of the authority finder contains 'Choose' buttons which _should_ insert all data from the chosen authority into the appropriate subfields of the MARC tag you are editing [3]. However, in UNIMARC setups this does not work: clicking on 'Choose' only populates subfield $a ('Entry Element') with data, but not subfields $3 and $5 ('Authority Record Number' and 'Tracing Control', respectively), which are just as important for correct authority linking. I've tracked this down to these lines of code which are MARC21-specific and use hardcoded subfield values in blinddetail-biblio-search.pl: 91 for ( $field->subfields ) { 92 next if $_->[0] eq '9'; # $9 will be set with authid value 101 push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship ); There is also this code in the template blinddetail-biblio-search.tt: 38 [%- END -%]‡9[% authid | html %]"; 138 if(code.value=='9'){ 139 subfield.value = "[% authid |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"; These code fragments don't work 100% because in UNIMARC authorities the authid value is stored in subfield $3 and the relationship code in $5. I propose to modify the Perl script above (which is currently MARC flavour agnostic), have it check the 'marcflavour' system preference, and use that to decide which subfield to push the authority relator code to. A similar approach in the template file will set the authid subfield value depending on whether you are a MARC21 or UNIMARC user. [1] Known as the 'Related Access Point Block' in recent IFLA updates. [2] For the ellipsis to appear next to a subfield, you must view the MARC structure of the relevant authority type and then edit the subfields of the tag you're interested in. Finally, you must select an authority type from the 'Thesaurus:' dropdown menu. [3] Under the hood each 'Choose' button is a call to the JS function doauth(), which in turn calls blinddetail-biblio-search.pl with the parameters required (authid, relationship, etc.). -- 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=21453 Andreas Roussos <arouss1980@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |arouss1980@gmail.com |ity.org | See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=8332 -- 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=21453 --- Comment #1 from Andreas Roussos <arouss1980@gmail.com> --- Created attachment 79609 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79609&action=edit Bug 21453: blinddetail-biblio-search.pl/.tt use hardcoded subfield values for MARC21 When using the authority finder plugin, you can pick an entry from the 'Special relationship:' dropdown menu in order to set the relationship between authorities. If you're on a UNIMARC setup and click one of the 'Choose' buttons for the search results, only subfield $a (i.e. 'Entry Element') will be copied over to the authority tag you are editing. In MARC21 installs, however, all the authority data plus the authority id are correctly copied over. This is due to hardcoded subfield values in blinddetail-biblio-search{.pl,.tt} which are MARC21-specific. This patch fixes that by checking the 'marcflavour' system preference and selecting the correct subfields to copy the authority data to. Test plan (steps 0-4 are common to both UNIMARC and MARC21 setups): 0) [PREREQUISITES in order for the authority finder plugin to come up] a) You must have at least one authority type besides the 'default'. b) View the MARC structure of the 'default' auth type, then click on 'Actions->Subfields' for tag 500; click on 'Edit subfields'. c) Select the subfield 'a' tab, then pick an auth type from the 'Thesaurus:' dropdown menu; click 'Save changes' at the top. 1) In the Staff client, go to Authorities, then click 'New Authority' and pick the 'default' authority type. 2) When the authority editor comes up, go to tag 500 and expand it. 3) Click on the ellipsis (...) next to subfield 'a'. 4) When the authority finder comes up, search for an authority, pick a relator code from the 'Special relationship:' dropdown, and then click on the 'Choose' button for one of the authorities you found. 5) MARC21: all subfields are populated correctly. UNIMARC: notice how subfields $3 and $5 are not populated. 6) Apply the patch (you may have to restart Plack, too). 7) Repeat steps 3) and 4) above. MARC21: all subfields are populated correctly, same as before. UNIMARC: both the relator code and the authority id are copied over along with any other subfields that may exist. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Andreas Roussos <arouss1980@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Andreas Roussos <arouss1980@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED --- Comment #2 from Andreas Roussos <arouss1980@gmail.com> --- A colleague has found a case where the patch does not work as intended and may break some setups: when the authority finder is used from within the bibliographic editor (e.g. to link an authority to UNIMARC tag 700), it will populate field $3 ('Authority Record Number') with the auth id but not field $9 ('Koha Internal Code') as it did prior to the patch. I'll try to revise my patch and provide a more thorough test plan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Andreas Roussos <arouss1980@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79609|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #3 from Andreas Roussos <arouss1980@gmail.com> --- I've amended my patch and reworded some parts of the commit message that were ambiguous. The patch now takes NORMARC into account as well, which is similar to MARC21 from what I gather by reading the following: https://wiki.koha-community.org/wiki/Add_support_for_NORMARC#Code_changes http://lists.koha-community.org/pipermail/koha-devel/2010-July/034257.html https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11611#c9 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #4 from Andreas Roussos <arouss1980@gmail.com> --- Created attachment 80140 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80140&action=edit Bug 21453: blinddetail-biblio-search.pl/.tt use hardcoded subfield values for MARC21 When using the authority finder plugin from within the Authorities module, you can pick an entry from the 'Special relationship:' dropdown menu in order to set the relationship between authorities. On a UNIMARC setup, clicking on 'Choose' will not populate subfields $3 (Authority Record Number) and $5 (Tracing Control), which are required for authority linking and hierarchies to work properly. In MARC21 installs, however, all authority data is correctly copied over. This is due to hardcoded subfield values which are MARC21-specific in blinddetail-biblio-search{.pl,.tt}. This patch fixes that by checking the value of 'marcflavour' syspref, and then setting the correct subfields to copy the authority data to. Test plan: 0) [PREREQUISITES in order for the authority finder plugin to come up] a) You must have at least one authority type besides the 'Default'. b) View the MARC structure of the 'Default' auth type, then click on 'Actions->Subfields' for tag 500; click on 'Edit subfields'. Select the subfield 'a' tab, then pick an auth type from the 'Thesaurus:' dropdown menu; click 'Save changes' at the top. 1) In the Staff client, go to Authorities, then click 'New Authority' and pick the 'Default' authority type (or edit an existing auth). 2) When the authority editor comes up, go to tag 500 and expand it. 3) Click on the ellipsis (...) next to subfield $a. 4) When the authority finder comes up, search for an authority, pick a relator code from the 'Special relationship:' dropdown, and then click on the 'Choose' button for one of the authorities you found. 5) MARC21/NORMARC setup: all subfields are populated correctly. UNIMARC setup: notice how subfields $3 and $5 are not populated. 6) Apply the patch. 7) Repeat steps 3) and 4) above. MARC21/NORMARC: all subfields are populated correctly, as before. UNIMARC: both the relator code and the authority id are copied over along with any other subfields that may exist. 8) To ensure that authority linking in the Cataloging module works as before, launch the biblio editor, find a MARC tag that allows you to search for an authority, and link it. MARC21/NORMARC: all authority data is copied over (auth id in $9). UNIMARC: all authority data is copied over (auth id in $9). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Andreas Roussos <arouss1980@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Andreas Roussos <arouss1980@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21880 --- Comment #5 from Andreas Roussos <arouss1980@gmail.com> --- With regards to steps 3 & 4 above: the 'Choose' buttons in results pages other than 1 will not work because the 'source' parameter is missing from the URL pointed to by the pagination hyperlinks. I've added the 'source' parameter to the pagination URLs in a separate bug report (Bug 21880) that fixes a different issue. Therefore, I am marking #21880 as a dependency, hoping that it will be easier to follow the test plan this way. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21880 [Bug 21880] "Relationship information" disappears when accessing paginated results in authority searches -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 80140 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80140 Bug 21453: blinddetail-biblio-search.pl/.tt use hardcoded subfield values for MARC21 Review of attachment 80140: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=21453&attachment=80140) ----------------------------------------------------------------- ::: authorities/blinddetail-biblio-search.pl @@ +92,4 @@
# Get all values for each distinct subfield and add to subfield loop my %done_subfields; for ( $field->subfields ) { + next if $_->[0] eq '3'; # $3 will be set with authid value (in UNIMARC authorities)
UNIMARC isn't checked. Bad expression? @@ +129,3 @@
$template->param( + source => $source, + marcflavour => $marcflavour,
There is no need to pass a systempreference. ::: koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt @@ +35,5 @@
[%- FOREACH marc_value IN SUBFIELD_LOO.marc_values -%] [%- marc_value |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html -%] [%- END -%] + [%- END -%][% IF ( marcflavour == 'UNIMARC' ) %]‡3[% authid %]"; + [% ELSIF ( marcflavour == 'MARC21' ) || ( marcflavour == 'NORMARC' ) %]‡9[% authid %]";
The filter is removed. QA Fail. @@ +137,4 @@
[% IF ( clear ) %] if (subfield){subfield.value="" ;} [% ELSE %] + [% IF ( marcflavour == 'UNIMARC' ) %]
Perhaps something like [% marcflavour = Koha.Preference('marcflavour') %] near the top? To avoid passing this as a parameter? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |mtompset@hotmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #7 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 180268 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180268&action=edit Bug 21453: copy data to the correct subfields when linking authorities with authorities When using the authority finder plugin from within Koha's Authorities module, you can pick an entry from the 'Special relationship:' dropdown menu in order to set the relationship between authorities. The problem is that in UNIMARC setups, when you click on 'Choose' to select an authority, it does not populate subfields $3 (Authority Record Number) and $5 (Tracing Control), which are required for authority linking and authority hierarchies to work properly. In MARC21, all authority data is correctly copied over. This is due to hardcoded subfield values which are MARC21-specific in blinddetail-biblio-search{.pl,.tt}. This patch fixes that by checking the value of the 'marcflavour' syspref, and then setting the correct subfields to copy the authority data to. Test plan (involves testing in both a MARC21 and a UNIMARC instance): 0) [PREREQUISITES in order for the authority finder plugin to come up when testing in a UNIMARC instance] a) You must have at least one authority type besides the 'Default'. b) View the MARC structure of the 'Default' auth type, then click on 'Actions->Subfields' for tag 500; click on 'Edit subfields'. Select the subfield 'a' tab, then pick an auth type from the 'Thesaurus:' dropdown menu; click 'Save changes' at the top. 1) In the Staff client, go to Authorities, then click 'New Authority' and pick the 'Default' authority type (or edit an existing auth). 2) When the authority editor comes up, go to tag 500 and expand it. 3) Click on the ellipsis (...) next to subfield $a. 4) When the authority finder comes up, search for an authority, pick a relator code from the 'Special relationship:' dropdown, and then click on the 'Choose' button for one of the authorities you found. 5) In MARC21: all subfields are populated correctly. In UNIMARC: notice how subfields $3 and $5 are *not* populated. 6) Apply the patch. 7) Repeat steps 3) and 4) above. In MARC21: all subfields are populated correctly, as before. In UNIMARC: both the relator code and the authority id are copied over along with any other subfields that may exist. 8) To ensure that authority linking in the Cataloging module works as before, launch the bibliographic record editor, find a MARC tag that allows you to search for an authority, and link it. In MARC21: all authority data is copied over (authid in $9). In UNIMARC: all authority data is copied over (authid in $9). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |39501 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39501 [Bug 39501] Incorrect relationship code chosen when linking authorities with other authorities -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #8 from Andreas Roussos <a.roussos@dataly.gr> --- I have revised my patch following the valuable feedback provided by Mark, and also rebased it in order to apply on the current main branch. Any references to NORMARC have been removed, as support for this standard has been removed from Koha as part of Bug 18984. The test plan has been reworded to make it easier to follow; hopefully it will be easier to test in both MARC21 and UNIMARC instances this way... Finally, there's now a dependency on Bug 39501. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80140|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #9 from David Nind <david@davidnind.com> --- I attempted to test (using KTD), but I couldn't make things to work for a UNIMARC instance. Things work as per the test plan for a MARC21 instance. For a UNIMARC instance: 1. I made the changes in step 0 of the test plan. (I chose the PERS option for Thesaurus.) 2. Note that there are several authority types in KTD for a UNIMARC instance, and I didn't make any other changes. 3. When creating a new authority record (with the default authority type) the tag editor appears next to 500$a. 4. The authority finder does not return any results, for example using a in the search entire record field (it does in the normal authority search). I'm assuming there is something else required to make this work, or I've done something incorrectly. I'll leave someone more familiar with UNIMARC, authority records, and the authority finder to test. Testing notes (using KTD): 1. To start up a UNIMARC instance, edit your .env file and change KOHA_MARC_FLAVOUR=unimarc. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Needs Signoff |Failed QA --- Comment #10 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Missing a filter: [FAIL] koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt FAIL filters missing_filter at line 159 ( var source = "[% source %]";) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #11 from Andreas Roussos <a.roussos@dataly.gr> --- (In reply to David Nind from comment #9)
I attempted to test (using KTD), but I couldn't make things to work for a UNIMARC instance. Thanks for testing this, David!
4. The authority finder does not return any results, for example using a in the search entire record field (it does in the normal authority search). I wonder if this is because the KTD sample data does not contain any authorities of authtype 'PERS' (Character)?
Did you press the 'Search' button in the authority finder, or just typed 'a' in the 'Search entire record:' search field? I'm asking because that field needs at least three characters typed in for the autocomplete dropdown to work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #12 from Andreas Roussos <a.roussos@dataly.gr> --- (In reply to Lucas Gass (lukeg) from comment #10)
Missing a filter:
[FAIL] koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt FAIL filters missing_filter at line 159 ( var source = "[% source %]";) Hi Lucas!
Good catch, thanks for spotting this! I'll submit a corrected patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180268|0 |1 is obsolete| | --- Comment #13 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 190478 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190478&action=edit Bug 21453: copy data to the correct subfields when linking authorities with authorities When using the authority finder plugin from within Koha's Authorities module, you can pick an entry from the 'Special relationship:' dropdown menu in order to set the relationship between authorities. The problem is that in UNIMARC setups, when you click on 'Choose' to select an authority, it does not populate subfields $3 (Authority Record Number) and $5 (Tracing Control), which are required for authority linking and authority hierarchies to work properly. In MARC21, all authority data is correctly copied over. This is due to hardcoded subfield values which are MARC21-specific in blinddetail-biblio-search{.pl,.tt}. This patch fixes that by checking the value of the 'marcflavour' syspref, and then setting the correct subfields to copy the authority data to. Test plan (involves testing in both a MARC21 and a UNIMARC instance): 0) [PREREQUISITES in order for the authority finder plugin to come up when testing in a UNIMARC instance] a) You must have at least one authority type besides the 'Default'. b) View the MARC structure of the 'Default' auth type, then click on 'Actions->Subfields' for tag 500; click on 'Edit subfields'. Select the subfield 'a' tab, then pick an auth type from the 'Thesaurus:' dropdown menu; click 'Save changes' at the top. 1) In the Staff client, go to Authorities, then click 'New Authority' and pick the 'Default' authority type. 2) When the authority editor comes up, go to tag 500 and expand it. 3) Click on the Tag editor icon next to subfield $a. 4) When the authority finder comes up, search for an authority, pick a relator code from the 'Special relationship:' dropdown, and then click on the 'Choose' button for one of the authorities you found. 5) In MARC21: all subfields are populated correctly. In UNIMARC: notice how subfields $3 and $5 are *not* populated. 6) Apply the patch. 7) Repeat steps 3) and 4) above. In MARC21: all subfields are populated correctly, as before. In UNIMARC: both the relator code and the authority id are copied over along with any other subfields that may exist. 8) To ensure that authority linking in the Cataloging module works as before, launch the bibliographic record editor, find a MARC tag that allows you to search for an authority, and link it. In MARC21: all authority data is copied over (authid in $9). In UNIMARC: all authority data is copied over (authid in $9). NOTE: after linking, you may have to expand the MARC tag you chose so that subfield $9 becomes visible. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #14 from David Nind <david@davidnind.com> --- Created attachment 195747 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195747&action=edit Bug 21453: Copy data to the correct subfields when linking authorities with authorities When using the authority finder plugin from within Koha's Authorities module, you can pick an entry from the 'Special relationship:' dropdown menu in order to set the relationship between authorities. The problem is that in UNIMARC setups, when you click on 'Choose' to select an authority, it does not populate subfields $3 (Authority Record Number) and $5 (Tracing Control), which are required for authority linking and authority hierarchies to work properly. In MARC21, all authority data is correctly copied over. This is due to hardcoded subfield values which are MARC21-specific in blinddetail-biblio-search{.pl,.tt}. This patch fixes that by checking the value of the 'marcflavour' syspref, and then setting the correct subfields to copy the authority data to. Test plan (involves testing in both a MARC21 and a UNIMARC instance): 0) [PREREQUISITES in order for the authority finder plugin to come up when testing in a UNIMARC instance] a) You must have at least one authority type besides the 'Default'. b) View the MARC structure of the 'Default' auth type, then click on 'Actions->Subfields' for tag 500; click on 'Edit subfields'. Select the subfield 'a' tab, then pick an auth type from the 'Thesaurus:' dropdown menu; click 'Save changes' at the top. 1) In the Staff client, go to Authorities, then click 'New Authority' and pick the 'Default' authority type. 2) When the authority editor comes up, go to tag 500 and expand it. 3) Click on the Tag editor icon next to subfield $a. 4) When the authority finder comes up, search for an authority, pick a relator code from the 'Special relationship:' dropdown, and then click on the 'Choose' button for one of the authorities you found. 5) In MARC21: all subfields are populated correctly. In UNIMARC: notice how subfields $3 and $5 are *not* populated. 6) Apply the patch. 7) Repeat steps 3) and 4) above. In MARC21: all subfields are populated correctly, as before. In UNIMARC: both the relator code and the authority id are copied over along with any other subfields that may exist. 8) To ensure that authority linking in the Cataloging module works as before, launch the bibliographic record editor, find a MARC tag that allows you to search for an authority, and link it. In MARC21: all authority data is copied over (authid in $9). In UNIMARC: all authority data is copied over (authid in $9). NOTE: after linking, you may have to expand the MARC tag you chose so that subfield $9 becomes visible. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190478|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #15 from David Nind <david@davidnind.com> --- I had a go at testing this again, and think I got things working correctly. For a MARC21 instance, the test plan worked as written. For a UNIMARC instance, I found the test plan confusing: - Step 5, in KTD none of the authority types seem to have a $5 (for example, 600 has a $3 and an $a) - Step 7 (after the patch), works as expected for authority records: puts the term in $a (Entry Element) and a number in $3 (Authority Record Number) - For step 8 (after the patch, bibliographical record), I tested using tag 600 for a bibliographic record: text of term in $a, and $9 (Koha number) has the authority id (there is nothing in $3 (Authority Record Number)) Feel free to change back to needs sign off if I haven't tested correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195747|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #16 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 197783 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197783&action=edit Bug 21453: Copy data to the correct subfields when linking authorities with authorities When using the authority finder plugin from within Koha's Authorities module, you can pick an entry from the 'Special relationship:' dropdown menu in order to set the relationship between authorities. The problem is that in UNIMARC setups, when you click on 'Choose' to select an authority, it does not populate subfields $3 (Authority Record Number) and $5 (Tracing Control), which are required for authority linking and authority hierarchies to work properly. In MARC21, all authority data is correctly copied over. This is due to hardcoded subfield values which are MARC21-specific in blinddetail-biblio-search{.pl,.tt}. This patch fixes that by checking the value of the 'marcflavour' syspref, and then setting the correct subfields to copy the authority data to. Test plan (involves testing in both a MARC21 and a UNIMARC instance): 0) [PREREQUISITES in order for the authority finder plugin to come up when testing in a UNIMARC instance] a) You must have at least one authority type besides the 'Default'. b) View the MARC structure of the 'Default' auth type, then click on 'Actions->Subfields' for tag 500; click on 'Edit subfields'. Select the subfield 'a' tab, then pick an auth type from the 'Thesaurus:' dropdown menu; click 'Save changes' at the top. 1) In the Staff client, go to Authorities, then click 'New Authority' and pick the 'Default' authority type. 2) When the authority editor comes up, go to tag 500 and expand it. 3) Click on the Tag editor icon next to subfield $a. 4) When the authority finder comes up, search for an authority, pick a relator code from the 'Special relationship:' dropdown, and then click on the 'Choose' button for one of the authorities you found. 5) In MARC21: all subfields are populated correctly. In UNIMARC: notice how subfields $3 and $5 are *not* populated. 6) Apply the patch. 7) Repeat steps 3) and 4) above. In MARC21: all subfields are populated correctly, as before. In UNIMARC: both the relator code and the authority id are copied over along with any other subfields that may exist. 8) To ensure that authority linking in the Cataloging module works as before, launch the bibliographic record editor, find a MARC tag that allows you to search for an authority, and link it. In MARC21: all authority data is copied over (authid in $9). In UNIMARC: all authority data is copied over (authid in $9). NOTE: after linking, you may have to expand the MARC tag you chose so that subfield $9 becomes visible. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42281 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42281 [Bug 42281] Tidy all script tags - authorities -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #17 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #18 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42920 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42920 [Bug 42920] Looking up authority records in Advanced editor appends 20 extra spaces -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phil@chetcolibrary.org --- Comment #19 from Phil Ringnalda <phil@chetcolibrary.org> --- This caused bug 21453. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21453 --- Comment #20 from Phil Ringnalda <phil@chetcolibrary.org> --- (In reply to Phil Ringnalda from comment #19)
This caused bug 21453.
Err, this *is* bug 21453, which *caused* bug 42920 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org