Bugzilla – Attachment 129598 Details for
Bug 29511
While editing MARC records, blank subfields appear in varying order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29511: Sort hash keys
Bug-29511-Sort-hash-keys.patch (text/plain), 1.48 KB, created by
Martin Renvoize (ashimema)
on 2022-01-19 10:54:20 UTC
(
hide
)
Description:
Bug 29511: Sort hash keys
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-01-19 10:54:20 UTC
Size:
1.48 KB
patch
obsolete
>From 61aa4653f3246f8283b2341afd5254ce0f9526e3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 23 Nov 2021 13:39:57 +0000 >Subject: [PATCH] Bug 29511: Sort hash keys > >This code exists in authorities/authorities.pl and the hash keys are sorted >I just do the same here > >To test: >1 - Find/create a record with 245a 245h populated >2 - Load/reload the record several times and note that fields c and b are ordered randomly >3 - Apply patch >4 - Reload and note c and b are ordered alphabetically >5 - Move subfield h before subfield c >6 - Save and reload >7 - Confirm that existing/filled fields retain order in the MARC record > >Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > cataloguing/addbiblio.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 090849da4d..036764417c 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -592,7 +592,7 @@ sub build_tabs { > } > > # now, loop again to add parameter subfield that are not in the MARC::Record >- foreach my $subfield ( keys %{ $tagslib->{$tag} } ) >+ foreach my $subfield ( sort( keys %{ $tagslib->{$tag} } ) ) > { > next if ( length $subfield != 1 ); > next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop ); >-- >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 29511
:
127762
|
127763
|
127955
|
128856
|
129598
|
129713