Bugzilla – Attachment 173348 Details for
Bug 38266
Incorrect attribute disabled in patron batch modification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38266: (bug 21083 follow-up) Increment after comparison
Bug-38266-bug-21083-follow-up-Increment-after-comp.patch (text/plain), 1.58 KB, created by
Phil Ringnalda
on 2024-10-25 11:31:34 UTC
(
hide
)
Description:
Bug 38266: (bug 21083 follow-up) Increment after comparison
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2024-10-25 11:31:34 UTC
Size:
1.58 KB
patch
obsolete
>From c941edbf92bc66712a6908d51d4a9cf1942436bf Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 24 Oct 2024 18:17:54 +0000 >Subject: [PATCH] Bug 38266: (bug 21083 follow-up) Increment after comparison > >To test: > 1 - Define a patron attribute as repeatable > 2 - Add multiple values to a patron (I used borrowernumber 5) > 3 - Tools->Batch patron modification > 4 - Modify the patron from step 1, selecting the attribute you created and checking the box to clear > 5 - View the patron, they look correct > 6 - Check the DB: > SELECT * FROM borrower_attributes WHERE borrowernumber=5; > 7 - There is one blank value > 8 - Apply patch > 9 - Repeat batch modification >10 - Check the DB, no attribute! >11 - Test with multiple attributes in the batch modification and ensure only the correct one is removed >12 - Sign off > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> >--- > tools/modborrowers.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl >index 190fe94b2b..76dacafe53 100755 >--- a/tools/modborrowers.pl >+++ b/tools/modborrowers.pl >@@ -419,7 +419,7 @@ if ( $op eq 'cud-do' ) { > my $i = 0; > for my $code (@attributes) { > push @{ $attributes->{$code}->{values} }, shift @attr_values; # Handling repeatables >- $attributes->{$code}->{disabled} = grep { $_ eq sprintf( "attr%s_value", ++$i ) } @disabled; >+ $attributes->{$code}->{disabled} = grep { $_ eq sprintf( "attr%s_value", $i++ ) } @disabled; > } > > for my $code ( keys %$attributes ) { >-- >2.44.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 38266
:
173304
|
173348
|
173579