Bugzilla – Attachment 45954 Details for
Bug 14610
Add ability to place article requests in Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14610 [QA Followup] - Change 'Open' to 'Pending'
Bug-14610-QA-Followup---Change-Open-to-Pending.patch (text/plain), 11.36 KB, created by
Kyle M Hall (khall)
on 2015-12-23 16:03:31 UTC
(
hide
)
Description:
Bug 14610 [QA Followup] - Change 'Open' to 'Pending'
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-12-23 16:03:31 UTC
Size:
11.36 KB
patch
obsolete
>From 6b2245dd863310f33d5c2036579608397d088608 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 30 Oct 2015 13:12:49 -0400 >Subject: [PATCH] Bug 14610 [QA Followup] - Change 'Open' to 'Pending' > >--- > Koha/ArticleRequest.pm | 2 +- > Koha/ArticleRequest/Status.pm | 4 ++-- > Koha/ArticleRequests.pm | 6 +++--- > Koha/Biblio.pm | 2 +- > Koha/Borrower.pm | 2 +- > circ/article-requests.pl | 2 +- > installer/data/mysql/atomicupdate/bug_14610.sql | 2 +- > .../intranet-tmpl/prog/en/modules/circ/article-requests.tt | 12 ++++++------ > .../intranet-tmpl/prog/en/modules/circ/request-article.tt | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 4 ++-- > t/db_dependent/ArticleRequests.t | 10 +++++----- > 11 files changed, 25 insertions(+), 25 deletions(-) > >diff --git a/Koha/ArticleRequest.pm b/Koha/ArticleRequest.pm >index cd0531d..acc39de 100644 >--- a/Koha/ArticleRequest.pm >+++ b/Koha/ArticleRequest.pm >@@ -48,7 +48,7 @@ Koha::ArticleRequest - Koha Article Request Object class > sub open { > my ($self) = @_; > >- $self->status(Koha::ArticleRequest::Status::Open); >+ $self->status(Koha::ArticleRequest::Status::Pending); > $self->notify(); > return $self; > } >diff --git a/Koha/ArticleRequest/Status.pm b/Koha/ArticleRequest/Status.pm >index e3d4d3f..f66324b 100644 >--- a/Koha/ArticleRequest/Status.pm >+++ b/Koha/ArticleRequest/Status.pm >@@ -19,8 +19,8 @@ package Koha::ArticleRequest::Status; > > use Modern::Perl; > >-sub Open { >- return 'OPEN'; >+sub Pending { >+ return 'PENDING'; > } > > sub Processing { >diff --git a/Koha/ArticleRequests.pm b/Koha/ArticleRequests.pm >index c5c06ca..a8da805 100644 >--- a/Koha/ArticleRequests.pm >+++ b/Koha/ArticleRequests.pm >@@ -38,13 +38,13 @@ Koha::ArticleRequests - Koha ArticleRequests Object class > > =cut > >-=head3 open >+=head3 pending > > =cut > >-sub open { >+sub pending { > my ( $self, $branchcode ) = @_; >- my $params = { status => Koha::ArticleRequest::Status::Open }; >+ my $params = { status => Koha::ArticleRequest::Status::Pending }; > $params->{branchcode} = $branchcode if $branchcode; > return Koha::ArticleRequests->search( $params ); > } >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index fce5a55..38da8b5 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -159,7 +159,7 @@ sub article_requests_current { > { > biblionumber => $self->biblionumber(), > -or => [ >- { status => Koha::ArticleRequest::Status::Open }, >+ { status => Koha::ArticleRequest::Status::Pending }, > { status => Koha::ArticleRequest::Status::Processing } > ] > } >diff --git a/Koha/Borrower.pm b/Koha/Borrower.pm >index 84ce27a..84f2e25 100644 >--- a/Koha/Borrower.pm >+++ b/Koha/Borrower.pm >@@ -72,7 +72,7 @@ sub article_requests_current { > { > borrowernumber => $self->id(), > -or => [ >- { status => Koha::ArticleRequest::Status::Open }, >+ { status => Koha::ArticleRequest::Status::Pending }, > { status => Koha::ArticleRequest::Status::Processing } > ] > } >diff --git a/circ/article-requests.pl b/circ/article-requests.pl >index f716f53..816c736 100755 >--- a/circ/article-requests.pl >+++ b/circ/article-requests.pl >@@ -40,7 +40,7 @@ my $branchcode = $query->param('branchcode') || C4::Context->userenv->{'branch'} > > $template->param( > branchcode => $branchcode, >- article_requests_open => scalar Koha::ArticleRequests->open($branchcode), >+ article_requests_pending => scalar Koha::ArticleRequests->pending($branchcode), > article_requests_processing => scalar Koha::ArticleRequests->processing($branchcode), > ); > >diff --git a/installer/data/mysql/atomicupdate/bug_14610.sql b/installer/data/mysql/atomicupdate/bug_14610.sql >index 7c34c95..5777e7d 100644 >--- a/installer/data/mysql/atomicupdate/bug_14610.sql >+++ b/installer/data/mysql/atomicupdate/bug_14610.sql >@@ -19,7 +19,7 @@ CREATE TABLE IF NOT EXISTS `article_requests` ( > `date` text, > `pages` text, > `chapters` text, >- `status` enum('OPEN','PROCESSING','COMPLETED','CANCELED') NOT NULL DEFAULT 'OPEN', >+ `status` enum('PENDING','PROCESSING','COMPLETED','CANCELED') NOT NULL DEFAULT 'PENDING', > `notes` text, > `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, > `updated_on` timestamp NULL DEFAULT NULL, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >index d6afbfe..139443b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >@@ -110,13 +110,13 @@ > > <div id="article-request-tabs" class="toptabs"> > <ul> >- <li><a href="#article-requests-open">Open ([% article_requests_open.count %])</a></li> >+ <li><a href="#article-requests-pending">Pending ([% article_requests_pending.count %])</a></li> > <li><a href="#article-requests-processing">Processing ([% article_requests_processing.count %])</a></li> > </ul> > >- <div id="article-requests-open"> >- [% IF article_requests_open.count %] >- <table id="article-requests-processing-open-table"> >+ <div id="article-requests-pending"> >+ [% IF article_requests_pending.count %] >+ <table id="article-requests-processing-pending-table"> > <thead> > <tr> > <th class="ar-title">Title</th> >@@ -134,7 +134,7 @@ > </thead> > > <tbody> >- [% FOREACH ar IN article_requests_open %] >+ [% FOREACH ar IN article_requests_pending %] > <tr> > <td class="ar-title"> > <p> >@@ -235,7 +235,7 @@ > </tbody> > </table> > [% ELSE %] >- There are currently no open article requests. >+ There are currently no pending article requests. > [% END %] > </div> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >index 63c3cb0..04fae7d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >@@ -292,8 +292,8 @@ $(document).ready(function() { > [% END %] > </td> > <td> >- [% IF ar.status == 'OPEN' %] >- Open >+ [% IF ar.status == 'PENDING' %] >+ Pending > [% ELSIF ar.status == 'PROCESSING' %] > Processing > [% ELSIF ar.status == 'COMPLETED' %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index e691eec..ffcedb9 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -748,8 +748,8 @@ > </td> > > <td class="article-request-status"> >- [% IF ar.status == 'OPEN' %] >- Open >+ [% IF ar.status == 'PENDING' %] >+ Pending > [% ELSIF ar.status == 'PROCESSING' %] > Processing > [% ELSIF ar.status == 'COMPLETED' %] >diff --git a/t/db_dependent/ArticleRequests.t b/t/db_dependent/ArticleRequests.t >index 7d48ffa..78d5e87 100755 >--- a/t/db_dependent/ArticleRequests.t >+++ b/t/db_dependent/ArticleRequests.t >@@ -79,14 +79,14 @@ my $article_request = Koha::ArticleRequest->new( > $article_request = Koha::ArticleRequests->find( $article_request->id ); > ok( $article_request->id, 'Koha::ArticleRequest created' ); > >-is( $article_request->status, Koha::ArticleRequest::Status::Open, 'New article request has status of Open' ); >+is( $article_request->status, Koha::ArticleRequest::Status::Pending, 'New article request has status of Open' ); > $article_request->process(); > is( $article_request->status, Koha::ArticleRequest::Status::Processing, '$ar->process() changes status to Processing' ); > $article_request->complete(); > is( $article_request->status, Koha::ArticleRequest::Status::Completed, '$ar->complete() changes status to Completed' ); > $article_request->cancel(); > is( $article_request->status, Koha::ArticleRequest::Status::Canceled, '$ar->complete() changes status to Canceled' ); >-$article_request->status(Koha::ArticleRequest::Status::Open); >+$article_request->status(Koha::ArticleRequest::Status::Pending); > $article_request->store(); > > is( $article_request->biblio->id, $biblio->id, '$ar->biblio() gets corrosponding Koha::Biblio object' ); >@@ -105,7 +105,7 @@ is( $patron->article_requests_current()->count(), 0, 'Completed request not retu > $article_request->cancel(); > is( $patron->article_requests_current()->count(), 0, 'Canceled request not returned for article_requests_current' ); > >-$article_request->status(Koha::ArticleRequest::Status::Open); >+$article_request->status(Koha::ArticleRequest::Status::Pending); > $article_request->store(); > > is( $patron->article_requests_finished()->count(), 0, 'Open request returned for article_requests_finished' ); >@@ -115,7 +115,7 @@ $article_request->complete(); > $article_request->cancel(); > is( $patron->article_requests_finished()->count(), 1, 'Canceled request not returned for article_requests_finished' ); > >-$article_request->status(Koha::ArticleRequest::Status::Open); >+$article_request->status(Koha::ArticleRequest::Status::Pending); > $article_request->store(); > > $ar = $biblio->article_requests(); >@@ -130,7 +130,7 @@ is( $biblio->article_requests_current()->count(), 0, 'Completed request not retu > $article_request->cancel(); > is( $biblio->article_requests_current()->count(), 0, 'Canceled request not returned for article_requests_current' ); > >-$article_request->status(Koha::ArticleRequest::Status::Open); >+$article_request->status(Koha::ArticleRequest::Status::Pending); > $article_request->store(); > > is( $biblio->article_requests_finished()->count(), 0, 'Open request returned for article_requests_finished' ); >-- >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 14610
:
42822
|
42823
|
42824
|
42825
|
42826
|
42827
|
42828
|
42829
|
43198
|
43199
|
43200
|
43201
|
43202
|
43264
|
43265
|
43266
|
43267
|
43268
|
43270
|
43271
|
43272
|
43273
|
43274
|
43278
|
43279
|
43280
|
43281
|
43282
|
43654
|
43655
|
43656
|
43657
|
43658
|
44219
|
44220
|
44221
|
44222
|
44223
|
44224
|
44225
|
44226
|
44227
|
44228
|
44229
|
44230
|
44231
|
44232
|
44233
|
44234
|
44235
|
44236
|
44237
|
44238
|
44239
|
44240
|
44241
|
44242
|
44916
|
44917
|
44918
|
44919
|
44920
|
44921
|
44922
|
44923
|
44924
|
44925
|
44926
|
45946
|
45947
|
45948
|
45949
|
45950
|
45951
|
45952
|
45953
|
45954
|
45955
|
45956
|
46518
|
46519
|
46520
|
46521
|
46522
|
46523
|
46524
|
46525
|
46526
|
46527
|
46528
|
46529
|
46530
|
46595
|
46596
|
46597
|
46598
|
46599
|
46600
|
46601
|
46602
|
46603
|
46604
|
46605
|
46606
|
46607
|
46608
|
46609
|
46610
|
46611
|
46612
|
47905
|
47906
|
47907
|
47908
|
47909
|
47910
|
47911
|
47912
|
47913
|
47914
|
47915
|
47916
|
47917
|
47918
|
47919
|
47920
|
47921
|
47922
|
48177
|
48178
|
48179
|
48180
|
48181
|
48182
|
48212
|
48213
|
48214
|
48215
|
48216
|
48217
|
48218
|
50348
|
50349
|
50350
|
50351
|
50352
|
50353
|
50354
|
51527
|
51528
|
51529
|
51530
|
51531
|
51532
|
51533
|
51534
|
51778
|
51779
|
51780
|
51781
|
51782
|
51783
|
52688
|
52689
|
52690
|
52691
|
52692
|
52693
|
55556
|
55557
|
55558
|
55559
|
55560
|
55561
|
55568
|
55569
|
56084
|
56085
|
56086
|
56087
|
56088
|
56089
|
56090
|
56318
|
56319
|
56320
|
56321
|
56322
|
56323
|
56324
|
56325
|
56326
|
56327
|
56328
|
56775
|
56776
|
56777
|
56778
|
56779
|
56780
|
56781
|
56782
|
56783
|
56784
|
56785
|
56816
|
56854
|
56855
|
56856
|
56857
|
56858
|
56859
|
56860
|
56861
|
56862
|
56863
|
56864
|
56865