Bugzilla – Attachment 140060 Details for
Bug 22666
When using authority records in a bibliographic record, the order of the subfields is not sent over
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25387: The order of authority subfield is not sent over to bibliographic record
Bug-25387-The-order-of-authority-subfield-is-not-s.patch (text/plain), 3.21 KB, created by
George Veranis
on 2022-09-01 19:30:52 UTC
(
hide
)
Description:
Bug 25387: The order of authority subfield is not sent over to bibliographic record
Filename:
MIME Type:
Creator:
George Veranis
Created:
2022-09-01 19:30:52 UTC
Size:
3.21 KB
patch
obsolete
>From 4dfa5e01096d4c859e7463f6ffb7a46d68f1f663 Mon Sep 17 00:00:00 2001 >From: Marion Durand <marion.durand@biblibre.com> >Date: Fri, 8 Oct 2021 16:58:36 +0200 >Subject: [PATCH] Bug 25387: The order of authority subfield is not sent over > to bibliographic record > >When creating an authority record there is the possibility to reorder >the subfield. However this order is not sent back to the bibliographic >records when using this authority in a bibliographic record. > >This patch make the order of subfield be sent back to bibliographic >record when the autority is used. >Field that are fill are sent to the begining of the bibliographic record >in the same order as in the authority record. > >Test plan: >1- Find or create an authority record and reorder some subfield >2- Use this authority in a bibliographic record >3- Observe that the order of the subfield is not transferred from the > authority record to the bibliographic record >4- Apply the patch >5- Repeat step 1 and 2 again >6- Observe that the order of the subfield is now transferred from the > authority record to the bibliographic record > >https://bugs.koha-community.org/show_bug.cgi?id=22666 >--- > .../authorities/blinddetail-biblio-search.tt | 25 +++++++++++++++++++ > 1 file changed, 25 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt >index 6a10d7d45d..ee27c4c886 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt >@@ -110,7 +110,32 @@ > i++; > }); > } >+ >+ function ReOrderSubField(){ >+ var isFirst=1; >+ var subfield_start = $(field_start).children('ul')[0]; >+ var first = subfield_start.firstElementChild; >+ >+ [% FOREACH SUBFIELD IN SUBFIELD_LOOP %] >+ // grab all subfields >+ var subfield_name = "[% To.json(tag_number) | $raw %][% To.json(SUBFIELD.marc_subfield) | $raw %]" >+ var re = new RegExp('^subfield' + subfield_name,'g'); >+ var subfields = $(subfield_start).children('li').filter( function() {return this.id.match(re); }); >+ for (var i=0; i<subfields.length; i++){ >+ var subfield = subfields[i]; >+ if (isFirst ==1){ >+ first = subfield_start.insertBefore(subfield, first); >+ isFirst=0; >+ } >+ else{ >+ first = subfield_start.insertBefore(subfield, first.nextSibling); >+ } >+ } >+ [% END %] >+ } >+ > [% UNLESS ( clear ) %] >+ ReOrderSubField() > [% FOREACH SUBFIELD_LOO IN SUBFIELD_LOOP %] > SetSubfieldValues( > "[% To.json(tag_number) | $raw %][% To.json(SUBFIELD_LOO.marc_subfield) | $raw %]" >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22666
:
129535
|
140060
|
142093