[Koha-patches] [PATCH] [SIGNED-OFF] Bug 2664: Add item should preselect logged in branch
Nicole Engard
nengard at bywatersolutions.com
Tue Oct 5 13:48:25 CEST 2010
From: Colin Campbell <colin.campbell at ptfs-europe.com>
An earlier fix to stop branch values being overwritten in
edit items was causing the branch value to be unset when adding items
Signed-off-by: Nicole Engard <nengard at bywatersolutions.com>
---
cataloguing/additem.pl | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
index ea4daf9..e6f19d2 100755
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -433,7 +433,10 @@ foreach my $tag (sort keys %{$tagslib}) {
foreach my $thisbranch (@$branches) {
push @authorised_values, $thisbranch->{value};
$authorised_lib{$thisbranch->{value}} = $thisbranch->{branchname};
- # $value = $thisbranch->{value} if $thisbranch->{selected};
+ # in edit item this is set to the data value otherwise use default
+ if ($op ne 'edititem' && $thisbranch->{selected} ) {
+ $value = $thisbranch->{value};
+ }
}
}
elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) {
--
1.5.6.5
More information about the Koha-patches
mailing list