Bugzilla – Attachment 61957 Details for
Bug 18274
C4::Items - Remove GetItemStatus
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18274: C4::Items - Remove GetItemStatus
Bug-18274-C4Items---Remove-GetItemStatus.patch (text/plain), 3.80 KB, created by
Marcel de Rooy
on 2017-04-07 06:19:48 UTC
(
hide
)
Description:
Bug 18274: C4::Items - Remove GetItemStatus
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-04-07 06:19:48 UTC
Size:
3.80 KB
patch
obsolete
>From 91ddb315089dab0b0dab4d019e8199155a1c1012 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Mar 2017 13:10:16 -0300 >Subject: [PATCH] Bug 18274: C4::Items - Remove GetItemStatus >MIME-Version: 1.0 >Content-Type: text/plain; charset=utf-8 >Content-Transfer-Encoding: 8bit >Content-Type: text/plain; charset=utf-8 > >This subroutine is no longer in used. >It was previously call from serials/serials-recieve.pl, which was not used and has been removed by > commit 65b7ad030cd5cd0e3148fbbd1496d31b5cf149f7 > Bug 13423: Remove unused serials-recieve > >Test plan: > git grep GetItemStatus >should not return any used calls (only 1 occurrence in release notes) > >Signed-off-by: Marc Véron <veron@veron.ch> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Items.pm | 92 ------------------------------------------------------------- > 1 file changed, 92 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index dda02a3..de27769 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -67,7 +67,6 @@ BEGIN { > > CheckItemPreSave > >- GetItemStatus > GetItemLocation > GetLostItems > GetItemsForInventory >@@ -776,97 +775,6 @@ has copy-and-paste work. > > =cut > >-=head2 GetItemStatus >- >- $itemstatushash = GetItemStatus($fwkcode); >- >-Returns a list of valid values for the >-C<items.notforloan> field. >- >-NOTE: does B<not> return an individual item's >-status. >- >-Can be MARC dependent. >-fwkcode is optional. >-But basically could be can be loan or not >-Create a status selector with the following code >- >-=head3 in PERL SCRIPT >- >- my $itemstatushash = getitemstatus; >- my @itemstatusloop; >- foreach my $thisstatus (keys %$itemstatushash) { >- my %row =(value => $thisstatus, >- statusname => $itemstatushash->{$thisstatus}->{'statusname'}, >- ); >- push @itemstatusloop, \%row; >- } >- $template->param(statusloop=>\@itemstatusloop); >- >-=head3 in TEMPLATE >- >-<select name="statusloop" id="statusloop"> >- <option value="">Default</option> >- [% FOREACH statusloo IN statusloop %] >- [% IF ( statusloo.selected ) %] >- <option value="[% statusloo.value %]" selected="selected">[% statusloo.statusname %]</option> >- [% ELSE %] >- <option value="[% statusloo.value %]">[% statusloo.statusname %]</option> >- [% END %] >- [% END %] >-</select> >- >-=cut >- >-sub GetItemStatus { >- >- # returns a reference to a hash of references to status... >- my ($fwk) = @_; >- my %itemstatus; >- my $dbh = C4::Context->dbh; >- my $sth; >- $fwk = '' unless ($fwk); >- my ( $tag, $subfield ) = >- GetMarcFromKohaField( "items.notforloan", $fwk ); >- if ( $tag and $subfield ) { >- my $sth = >- $dbh->prepare( >- "SELECT authorised_value >- FROM marc_subfield_structure >- WHERE tagfield=? >- AND tagsubfield=? >- AND frameworkcode=? >- " >- ); >- $sth->execute( $tag, $subfield, $fwk ); >- if ( my ($authorisedvaluecat) = $sth->fetchrow ) { >- my $authvalsth = >- $dbh->prepare( >- "SELECT authorised_value,lib >- FROM authorised_values >- WHERE category=? >- ORDER BY lib >- " >- ); >- $authvalsth->execute($authorisedvaluecat); >- while ( my ( $authorisedvalue, $lib ) = $authvalsth->fetchrow ) { >- $itemstatus{$authorisedvalue} = $lib; >- } >- return \%itemstatus; >- } >- else { >- >- #No authvalue list >- # build default >- } >- } >- >- #No authvalue list >- #build default >- $itemstatus{"1"} = "Not For Loan"; >- return \%itemstatus; >-} >- > =head2 GetItemLocation > > $itemlochash = GetItemLocation($fwk); >-- >2.1.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 18274
:
61107
|
61116
| 61957