Bugzilla – Attachment 31329 Details for
Bug 12850
C4::Serials::GetLateIssues is not used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 12850: C4::Serials::GetLateIssues can be removed
SIGNED-OFF-Bug-12850-C4SerialsGetLateIssues-can-be.patch (text/plain), 4.29 KB, created by
Nick Clemens (kidclamp)
on 2014-09-03 03:20:24 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 12850: C4::Serials::GetLateIssues can be removed
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2014-09-03 03:20:24 UTC
Size:
4.29 KB
patch
obsolete
>From b82114b5e45960c487d35e9d3cb87bdafce066af Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 29 Aug 2014 12:53:07 +0200 >Subject: [PATCH] [SIGNED OFF] Bug 12850: C4::Serials::GetLateIssues can be > removed > >This routine is not used and can be removed. > >Test plan: > git grep GetLateIssues >should not return any result > >Signed-off-by: Nick Clemens <nick@quecheelibrary.org> >--- > C4/Serials.pm | 60 +--------------------------------------------- > t/db_dependent/Serials.t | 4 +--- > 2 files changed, 2 insertions(+), 62 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index bcb37e3..54e8a5c 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -48,7 +48,7 @@ BEGIN { > > &GetNextSeq &GetSeq &NewIssue &ItemizeSerials &GetSerials > &GetLatestSerials &ModSerialStatus &GetNextDate &GetSerials2 >- &ReNewSubscription &GetLateIssues &GetLateOrMissingIssues >+ &ReNewSubscription &GetLateOrMissingIssues > &GetSerialInformation &AddItem2Serial > &PrepareSerialsData &GetNextExpected &ModNextExpected > >@@ -110,64 +110,6 @@ sub GetSuppliersWithLateIssues { > return $dbh->selectall_arrayref($query, { Slice => {} }); > } > >-=head2 GetLateIssues >- >-@issuelist = GetLateIssues($supplierid) >- >-this function selects late issues from the database >- >-return : >-the issuelist as an array. Each element of this array contains a hashi_ref containing >-name,title,planneddate,serialseq,serial.subscriptionid from tables : subscription, serial & biblio >- >-=cut >- >-sub GetLateIssues { >- my ($supplierid) = @_; >- >- return unless ($supplierid); >- >- my $dbh = C4::Context->dbh; >- my $sth; >- if ($supplierid) { >- my $query = qq| >- SELECT name,title,planneddate,serialseq,serial.subscriptionid >- FROM subscription >- LEFT JOIN serial ON subscription.subscriptionid = serial.subscriptionid >- LEFT JOIN biblio ON biblio.biblionumber = subscription.biblionumber >- LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id >- WHERE ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3) >- AND subscription.aqbooksellerid=? >- AND subscription.closed = 0 >- ORDER BY title >- |; >- $sth = $dbh->prepare($query); >- $sth->execute($supplierid); >- } else { >- my $query = qq| >- SELECT name,title,planneddate,serialseq,serial.subscriptionid >- FROM subscription >- LEFT JOIN serial ON subscription.subscriptionid = serial.subscriptionid >- LEFT JOIN biblio ON biblio.biblionumber = subscription.biblionumber >- LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id >- WHERE ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3) >- AND subscription.closed = 0 >- ORDER BY title >- |; >- $sth = $dbh->prepare($query); >- $sth->execute; >- } >- my @issuelist; >- my $last_title; >- while ( my $line = $sth->fetchrow_hashref ) { >- $line->{title} = "" if $last_title and $line->{title} eq $last_title; >- $last_title = $line->{title} if ( $line->{title} ); >- $line->{planneddate} = format_date( $line->{planneddate} ); >- push @issuelist, $line; >- } >- return @issuelist; >-} >- > =head2 GetSubscriptionHistoryFromSubscriptionId > > $history = GetSubscriptionHistoryFromSubscriptionId($subscriptionid); >diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t >index 8fbb709..5e1e10c 100644 >--- a/t/db_dependent/Serials.t >+++ b/t/db_dependent/Serials.t >@@ -15,7 +15,7 @@ use C4::Bookseller; > use C4::Biblio; > use C4::Budgets; > use Koha::DateUtils; >-use Test::More tests => 44; >+use Test::More tests => 43; > > BEGIN { > use_ok('C4::Serials'); >@@ -111,8 +111,6 @@ if (not $frequency->{unit}) { > my $expirationdate = GetExpirationDate($subscriptionid) ; > ok( $expirationdate, "expiration date is not NULL" ); > >-is(C4::Serials::GetLateIssues(), undef, 'test getting late issues'); >- > ok(C4::Serials::GetSubscriptionHistoryFromSubscriptionId($subscriptionid), 'test getting history from sub-scription'); > > my ($serials_count, @serials) = GetSerials($subscriptionid); >-- >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 12850
:
31274
|
31329
|
31346