Bugzilla – Attachment 120156 Details for
Bug 24564
The adding of new subfields according to IFLA updates doesn't respect existing tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl
Bug-24564-Do-not-modify-the-tab-of-existing-subfie.patch (text/plain), 2.29 KB, created by
Victor Grousset/tuxayo
on 2021-04-26 01:23:51 UTC
(
hide
)
Description:
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2021-04-26 01:23:51 UTC
Size:
2.29 KB
patch
obsolete
>From 1cda42fbb3fcdd26e1732cbbc57dfff8eee8ba35 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 31 Mar 2021 10:44:48 +0200 >Subject: [PATCH] Bug 24564: Do not modify the tab of existing subfield in > ifla/update.pl > >Test plan: >1. Find a biblio subfield in > misc/migration_tools/ifla/data/biblio/default.yml that you have in > your default biblio MARC framework (or create one). >2. Change the tab of this subfield so that it's different from what's in > the .yml file >3. Run misc/migration_tools/ifla/update.pl --force >4. Verify that the tab of this subfield has not been changed. >5. Do the same for authorities (files are in > misc/migration_tools/ifla/data/auth/) > >Signed-off-by: sonia <sonia.bouis@univ-lyon3.fr> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > misc/migration_tools/ifla/update.pl | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > >diff --git a/misc/migration_tools/ifla/update.pl b/misc/migration_tools/ifla/update.pl >index cca30f0a09..3d4be0a624 100755 >--- a/misc/migration_tools/ifla/update.pl >+++ b/misc/migration_tools/ifla/update.pl >@@ -236,7 +236,12 @@ for my $subfield (@subfields) { > say sprintf('Subfield already exists: %s$%s', $subfield->{tagfield}, $subfield->{tagsubfield}); > if ($force) { > say sprintf('Force mode is active, updating subfield %s$%s', $subfield->{tagfield}, $subfield->{tagsubfield}); >- $mss->update($subfield); >+ >+ # Do not modify the tab of existing subfield >+ my %values = %$subfield; >+ delete $values{tab}; >+ >+ $mss->update(\%values); > } > next; > } >@@ -299,7 +304,12 @@ for my $authsubfield (@authsubfields) { > say sprintf('Auth subfield already exists: %s$%s (%s)', $authsubfield->{tagfield}, $authsubfield->{tagsubfield}, $authsubfield->{authtypecode}); > if ($force) { > say sprintf('Force mode is active, updating auth subfield %s$%s (%s)', $authsubfield->{tagfield}, $authsubfield->{tagsubfield}, $authsubfield->{authtypecode}); >- $ass->update($authsubfield); >+ >+ # Do not modify the tab of existing subfield >+ my %values = %$authsubfield; >+ delete $values{tab}; >+ >+ $ass->update(\%values); > } > next; > } >-- >2.31.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 24564
:
119032
|
119068
|
119082
|
119103
|
119104
|
119136
|
119137
|
120156
|
120157
|
120691
|
120692