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>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a62953aa9e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5178687b67)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
078afc5161
commit
d4db820adb
|
|
@ -396,9 +396,9 @@ if ( $op eq 'do' ) {
|
|||
my @attr_values = $input->multi_param('patron_attributes_value');
|
||||
my $attributes;
|
||||
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;
|
||||
for my $code (@attributes) {
|
||||
push @{ $attributes->{$code}->{values} }, shift @attr_values; # Handling repeatables
|
||||
$attributes->{$code}->{disabled} = grep { $_ eq sprintf( "attr%s_value", $i++ ) } @disabled;
|
||||
}
|
||||
|
||||
for my $code ( keys %$attributes ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue