Created attachment 5719 [details] [review] Adds support for repeatable subfields when importing authorities. For example, if we try to import an authority with multiple $x subfields into a bibliographic record using the "..." link, only the last $x value get added to the form and the other values are ignored. Patch attached that adds all subfield values to the form, including repeated subfield values.
Sponsored by the CCSR ( http://www.ccsr.qc.ca )
This is a pretty big bug for MARC21 users. Upgrading the severity to reflect that.
Created attachment 5801 [details] [review] Adds support for repeatable subfields when importing authorities. Before this patch, if we tried to import an authority with multiple $x subfields into a bibliographic record, only the last value get added to the form. All repeated values should now be sent to the form. http://bugs.koha-community.org/show_bug.cgi?id=6977 Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This patch does not fix the ordering of subfields drawn from authority records, but it does not claim to, and just having working repeated subfields is a huge improvement, so I'm happy to sign off.
Created attachment 5851 [details] [review] Adds support for repeatable subfields when importing authorities. Before this patch, if we tried to import an authority with multiple $x subfields into a bibliographic record, only the last value get added to the form. All repeated values should now be sent to the form. http://bugs.koha-community.org/show_bug.cgi?id=6977 Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
QA comment The test plan is: - create an authority with repeated subfields - add biblio - retrieve authority through authority search - the repeated subfields are now correctly retrieved in the biblio * Tested under UNIMARC, works fine as well * no specific QA comment => passed QA
Also works continues to work with authorities WITHOUT repeated subfields. As Jared points out, it does not do anything about field order, but it does not purport to. Marking a Passed QA.
Minor string changes, but fairly major bug, pushing as string changes are only on staff side
Created attachment 6020 [details] [review] Follow-up patch : catch CloneSubfield errors I have found a problem with this functionnality : If subfields are repeated in the authority record, but these subfields are not repeatable in the biblio record, the CloneSubfield function fails with a javascript error, and the popup doesn't disappear. Example : Importing informations of a UNIF_TITLE authority with multiple $x subfields in the biblio's 440 field. On my test instance, 440$x isn't repeatable, so an error occurs when trying to clone it. I added a try/catch to catch the error. In that case, the subfield isn't cloned and only the first subfield value is added to the biblio record. Follow-up patch attached.
Created attachment 6285 [details] [review] [SIGNED-OFF] Bug 6977: Follow-up patch : catch CloneSubfield errors A javascript error could occur if the CloneSubfield function failed for any reason. This would prevent the popup from disappearing. Example : Importing informations of a UNIF_TITLE authority with multiple $x subfields in the biblio's 440 field. 440$x isn't repeatable, so an error occurs when trying to clone it.
nengard@debian:~/kohaclone$ git bz apply 6977 Bug 6977 - Support for repeated subfields when importing an authority into a biblio record field. Adds support for repeatable subfields when importing authorities. Apply? [yn] y Applying: Adds support for repeatable subfields when importing authorities. /home/nengard/kohaclone/.git/rebase-apply/patch:64: trailing whitespace. /home/nengard/kohaclone/.git/rebase-apply/patch:96: trailing whitespace. /home/nengard/kohaclone/.git/rebase-apply/patch:120: trailing whitespace. error: patch failed: authorities/blinddetail-biblio-search.pl:80 error: authorities/blinddetail-biblio-search.pl: patch does not apply error: patch failed: koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt:11 error: koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt: patch does not apply Patch failed at 0001 Adds support for repeatable subfields when importing authorities. When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". Patch left in /tmp/Adds-support-for-repeatable-subfields-when-importi-x8B4fU.patch nengard@debian:~/kohaclone$
Ooops - sorry about my last comment that was when i tried to apply paul's patch which was pushed already. This is signed off.
follow-up patch OK, pushed, please test
Included in 3.6 prior to 3.6.5.