Bugzilla – Attachment 31274 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]
Bug 12850: C4::Serials::GetLateIssues can be removed
Bug-12850-C4SerialsGetLateIssues-can-be-removed.patch (text/plain), 4.22 KB, created by
Jonathan Druart
on 2014-08-29 10:54:09 UTC
(
hide
)
Description:
Bug 12850: C4::Serials::GetLateIssues can be removed
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-08-29 10:54:09 UTC
Size:
4.22 KB
patch
obsolete
>From 222763f445505bc905d1f60a8aea3871b8985568 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] 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 >--- > 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); >-- >2.0.0.rc2
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