Bugzilla – Attachment 17092 Details for
Bug 9902
item subfields not populating
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9902 - item subfields not populating in 3.10
Bug-9902---item-subfields-not-populating-in-310.patch (text/plain), 2.86 KB, created by
Kyle M Hall (khall)
on 2013-04-01 12:06:59 UTC
(
hide
)
Description:
Bug 9902 - item subfields not populating in 3.10
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-04-01 12:06:59 UTC
Size:
2.86 KB
patch
obsolete
>From 3a4585d85dd1cf7d0380d29bf7cebe1c81320ec6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 27 Mar 2013 09:18:24 -0400 >Subject: [PATCH] Bug 9902 - item subfields not populating in 3.10 > >Test Plan: >1) Create a new serial with a default location, call number, and library > ( the library will need to be any but the one you are logged in as ) >2) Click the "Recieve" button for this serial >3) Click "Click to add item" >4) Note those values are not populated >5) Apply the patch >6) Reload the page >7) Click "Click to add item" >8) Note those values are now populated > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >All tests pass! >--- > C4/Items.pm | 9 ++++----- > 1 files changed, 4 insertions(+), 5 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 6533a68..a9f26be 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -2655,9 +2655,8 @@ sub PrepareItemrecordDisplay { > if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.itemcallnumber' > && $defaultvalues > && $defaultvalues->{'callnumber'} ) { >- if( $itemrecord and $defaultvalues and not $itemrecord->field($subfield) ){ >+ > $defaultvalue = $defaultvalues->{callnumber}; >- } > } > if ( ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' ) > && $defaultvalues >@@ -2670,9 +2669,7 @@ sub PrepareItemrecordDisplay { > && $defaultvalues > && $defaultvalues->{'location'} ) { > >- if ( $itemrecord and $defaultvalues and not $itemrecord->field($subfield) ) { > $defaultvalue = $defaultvalues->{location}; >- } > } > if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) { > my @authorised_values; >@@ -2701,7 +2698,7 @@ sub PrepareItemrecordDisplay { > $authorised_lib{$branchcode} = $branchname; > } > } >- $defaultvalue = C4::Context->userenv->{branch}; >+ $defaultvalue = $defaultvalues->{branchcode} || C4::Context->userenv->{branch}; > > #----- itemtypes > } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) { >@@ -2727,6 +2724,8 @@ sub PrepareItemrecordDisplay { > $authorised_lib{$class_source} = $class_sources->{$class_source}->{'description'}; > } > >+ $defaultvalue = $default_source; >+ > #---- "true" authorised value > } else { > $authorised_values_sth->execute( >-- >1.7.2.5
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 9902
:
16933
|
16938
|
17092
|
17093
|
17114
|
17257
|
18454
|
19388
|
20089