Bugzilla – Attachment 146059 Details for
Bug 32797
Cannot save OAI set mapping rule for subfield 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32797: Check if fields have a value, not if true
Bug-32797-Check-if-fields-have-a-value-not-if-true.patch (text/plain), 1.35 KB, created by
Marcel de Rooy
on 2023-02-03 07:24:36 UTC
(
hide
)
Description:
Bug 32797: Check if fields have a value, not if true
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-02-03 07:24:36 UTC
Size:
1.35 KB
patch
obsolete
>From 488982078eff3ce1a556de1ef5576a6fd264d23d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 2 Feb 2023 14:57:14 +0000 >Subject: [PATCH] Bug 32797: Check if fields have a value, not if true >Content-Type: text/plain; charset=utf-8 > >When saving OAI set mappgins we are checking for truth, this prevents >saving subfield 0. We should check for content > >To test: >1 - Go to Admin->OAI sets >2 - Create a set >3 - Define mappings for the set >4 - Attempt to save a rule on field 952 subfield 0 (withdrawn) >5 - It does not save >6 - Apply patch >7 - Try again >8 - Success! > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > admin/oai_set_mappings.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/admin/oai_set_mappings.pl b/admin/oai_set_mappings.pl >index 02103960f8..a47dadee4a 100755 >--- a/admin/oai_set_mappings.pl >+++ b/admin/oai_set_mappings.pl >@@ -60,7 +60,7 @@ if($op && $op eq "save") { > my @mappings; > my $i = 0; > while($i < @marcfields and $i < @marcsubfields and $i < @marcvalues) { >- if($marcfields[$i] and $marcsubfields[$i]) { >+ if($marcfields[$i] ne '' and $marcsubfields[$i] ne '' ) { > push @mappings, { > marcfield => $marcfields[$i], > marcsubfield => $marcsubfields[$i], >-- >2.30.2
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 32797
:
146011
|
146029
| 146059