Bugzilla – Attachment 64258 Details for
Bug 17680
C4::Circulation - Replace GetItemIssue with Koha::Checkouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17680: C4::Circulation - Remove GetItemIssue
Bug-17680-C4Circulation---Remove-GetItemIssue.patch (text/plain), 2.31 KB, created by
Jonathan Druart
on 2017-06-13 14:19:59 UTC
(
hide
)
Description:
Bug 17680: C4::Circulation - Remove GetItemIssue
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-06-13 14:19:59 UTC
Size:
2.31 KB
patch
obsolete
>From 0cf94463dc19cb1385a68fa4f13b1c4fa8804d96 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 25 Nov 2016 14:00:34 +0100 >Subject: [PATCH] Bug 17680: C4::Circulation - Remove GetItemIssue >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch simply removes the C4::Circulation::GetItemIssue subroutine > >Test plan: >At this point, `git grep GetItemIssue` should not return any occurrence >in the codebase > >Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > C4/Circulation.pm | 40 ---------------------------------------- > 1 file changed, 40 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 6988a0b48d..ae7e6e5b81 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -88,7 +88,6 @@ BEGIN { > &GetRenewCount > &GetSoonestRenewDate > &GetLatestAutoRenewDate >- &GetItemIssue > &GetIssuingCharges > &GetBranchBorrowerCircRule > &GetBranchItemRule >@@ -2487,45 +2486,6 @@ sub _GetCircControlBranch { > return $branch; > } > >- >- >- >- >- >-=head2 GetItemIssue >- >- $issue = &GetItemIssue($itemnumber); >- >-Returns patron currently having a book, or undef if not checked out. >- >-C<$itemnumber> is the itemnumber. >- >-C<$issue> is a hashref of the row from the issues table. >- >-=cut >- >-sub GetItemIssue { >- my ($itemnumber) = @_; >- return unless $itemnumber; >- my $sth = C4::Context->dbh->prepare( >- "SELECT items.*, issues.* >- FROM issues >- LEFT JOIN items ON issues.itemnumber=items.itemnumber >- WHERE issues.itemnumber=?"); >- $sth->execute($itemnumber); >- my $data = $sth->fetchrow_hashref; >- return unless $data; >- $data->{issuedate_sql} = $data->{issuedate}; >- $data->{date_due_sql} = $data->{date_due}; >- $data->{issuedate} = dt_from_string($data->{issuedate}, 'sql'); >- $data->{issuedate}->truncate(to => 'minute'); >- $data->{date_due} = dt_from_string($data->{date_due}, 'sql'); >- $data->{date_due}->truncate(to => 'minute'); >- my $dt = DateTime->now( time_zone => C4::Context->tz)->truncate( to => 'minute'); >- $data->{'overdue'} = DateTime->compare($data->{'date_due'}, $dt ) == -1 ? 1 : 0; >- return $data; >-} >- > =head2 GetOpenIssue > > $issue = GetOpenIssue( $itemnumber ); >-- >2.11.0
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 17680
:
57787
|
57788
|
57789
|
57847
|
58431
|
58432
|
58433
|
58501
|
58918
|
58919
|
58920
|
61761
|
61762
|
61763
|
62034
|
62086
|
62102
|
62103
|
62104
|
64257
|
64258
|
64259
|
64284
|
64337
|
64805
|
64806
|
64807
|
64833
|
64866
|
64867
|
64868
|
64869
|
64870
|
64871
|
64925
|
64926
|
64927
|
64928
|
64929
|
64930
|
64931
|
65302
|
65310