Bugzilla – Attachment 38505 Details for
Bug 14061
Inventory fails to map withdrawn authorized values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 14061: Fix broken mapping for not withdrawn items.
Signed-off-Bug-14061-Fix-broken-mapping-for-not-wi.patch (text/plain), 2.62 KB, created by
Marc Véron
on 2015-04-25 08:58:31 UTC
(
hide
)
Description:
[Signed-off] Bug 14061: Fix broken mapping for not withdrawn items.
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-04-25 08:58:31 UTC
Size:
2.62 KB
patch
obsolete
>From 18165d75b0046b94e384a44cbe79e517bf595cfe Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 24 Apr 2015 10:10:22 -0400 >Subject: [PATCH] [Signed-off] Bug 14061: Fix broken mapping for not withdrawn > items. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >TEST PLAN >--------- >1) Check what values to have entered for WITHDRAWN > authorized values > (Home -> Koha Administration -> Authorized values > change dropdown to WITHDRAWN) >2) Add a new authorized value of 0 () if one is missing. >3) Add a new authorized value of 1 (Withdrawn) if one is missing. >4) Run inventory on a filtered set such that the > selected barcode is not withdrawn. > (Home -> Tools -> Inventory/stocktaking) > -- the Withdrawn column displays '0'. >5) Run inventory on a filtered set such that the > selected barcode is withdrawn. > -- the Withdrawn column displays '1'. >6) Apply patch >7) Rerun steps 4 & 5 > -- the Withdrawn column displays the descriptions > as seen in steps 1-3. >8) run koha qa test tools > >Followed test plan #1-#7. Aut. value for 0 set to: 'No' amd 1: "withdrawn'. Works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > C4/Items.pm | 2 +- > tools/inventory.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 11ff4ca..344be1e 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1127,7 +1127,7 @@ sub GetItemsForInventory { > foreach (keys %$row) { > # If the koha field is mapped to a marc field > my ($f, $sf) = GetMarcFromKohaField("items.$_", $row->{'frameworkcode'}); >- if ($f and $sf) { >+ if (defined $f and defined $sf) { > # We replace the code with it's description > my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $row->{'frameworkcode'}); > $row->{$_} = $authvals->{$row->{$_}} if defined $authvals->{$row->{$_}}; >diff --git a/tools/inventory.pl b/tools/inventory.pl >index d463d19..a9d6d56 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -272,7 +272,7 @@ foreach my $item ( @scanned_items ) { > # If the koha field is mapped to a marc field > my $fc = $item->{'frameworkcode'} || ''; > my ($f, $sf) = GetMarcFromKohaField("items.$field", $fc); >- if ($f and $sf) { >+ if (defined $f and defined $sf) { > # We replace the code with it's description > my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $fc); > if ($authvals and defined $item->{$field} and defined $authvals->{$item->{$field}}) { >-- >1.7.10.4
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 14061
:
38485
|
38486
|
38487
|
38488
|
38489
|
38490
|
38491
|
38493
|
38505
|
38735