Bugzilla – Attachment 134195 Details for
Bug 30358
Strip leading/trailing whitespace characters from input fields when cataloguing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30358: (follow-up) Consider field has multiple subfields of same key
Bug-30358-follow-up-Consider-field-has-multiple-su.patch (text/plain), 1.11 KB, created by
Aleisha Amohia
on 2022-04-27 22:56:44 UTC
(
hide
)
Description:
Bug 30358: (follow-up) Consider field has multiple subfields of same key
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2022-04-27 22:56:44 UTC
Size:
1.11 KB
patch
obsolete
>From e762a88a9308f770e65627de4500fd7ddcfd38d6 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 27 Apr 2022 22:53:47 +0000 >Subject: [PATCH] Bug 30358: (follow-up) Consider field has multiple subfields > of same key > >To test: > >1) Click the clone subfield button to make multiple subfields with the >same key, i.e. 500$a$a$a >2) Save the record and confirm that the fields contain the correct data >after whitespaces are stripped. >--- > C4/Biblio.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index f78b17b47a..c52796837a 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -3077,7 +3077,8 @@ sub ModBiblioMarc { > my $value = $subfield->[1]; > $value =~ s/[\n\r]+/ /g; > $value =~ s/^\s+|\s+$|^\t+|\t+$//g; >- $field->update( $key => $value ); >+ $field->add_subfields( $key => $value ); # add subfield to the end of the subfield list >+ $field->delete_subfield( pos => 0 ); # delete the subfield at the top of the subfield list > } > } > } >-- >2.11.0
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 30358
:
132202
|
132275
|
132919
|
133055
|
133056
|
133140
|
133224
|
133225
|
134195
|
134453
|
137451
|
137452
|
137453
|
137454
|
137455
|
137456
|
137457
|
139110
|
142905
|
142906
|
142907
|
142908
|
142909
|
142910
|
142911
|
142912
|
143053
|
143057
|
143058
|
143059
|
143060
|
143061
|
143062
|
143063
|
143064
|
143065
|
144120
|
144121
|
144122
|
144123
|
144124
|
144125
|
144126
|
144127
|
144128
|
144129
|
144130
|
144171
|
145308
|
145309
|
145310
|
145311
|
145312
|
145313
|
145314
|
145315
|
145316
|
145317
|
145318
|
151202
|
151203
|
151204
|
151205
|
151206
|
151207
|
151208
|
151210
|
151212
|
151214
|
151215