@@ -, +, @@ --- 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 | 4 ++-- installer/data/mysql/en/mandatory/sample_notices.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 +++++----- 12 files changed, 27 insertions(+), 27 deletions(-) --- a/Koha/ArticleRequest.pm +++ a/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; } --- a/Koha/ArticleRequest/Status.pm +++ a/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 { --- a/Koha/ArticleRequests.pm +++ a/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 ); } --- a/Koha/Biblio.pm +++ a/Koha/Biblio.pm @@ -183,7 +183,7 @@ sub article_requests_current { { biblionumber => $self->biblionumber(), -or => [ - { status => Koha::ArticleRequest::Status::Open }, + { status => Koha::ArticleRequest::Status::Pending }, { status => Koha::ArticleRequest::Status::Processing } ] } --- a/Koha/Borrower.pm +++ a/Koha/Borrower.pm @@ -84,7 +84,7 @@ sub article_requests_current { { borrowernumber => $self->id(), -or => [ - { status => Koha::ArticleRequest::Status::Open }, + { status => Koha::ArticleRequest::Status::Pending }, { status => Koha::ArticleRequest::Status::Processing } ] } --- a/circ/article-requests.pl +++ a/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), ); --- a/installer/data/mysql/atomicupdate/bug_14610.sql +++ a/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, @@ -37,6 +37,6 @@ CREATE TABLE IF NOT EXISTS `article_requests` ( INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES ('circulation', 'AR_CANCELED', '', 'Article Request - Email - Canceled', 0, 'Article Request Canceled', '<> <> (<>)\r\n\r\nYour request for an article from <> (<>) has been canceled for the following reason:\r\n\r\n<>\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n', 'email'), ('circulation', 'AR_COMPLETED', '', 'Article Request - Email - Completed', 0, 'Article Request Completed', '<> <> (<>)\r\n\r\nWe are have completed your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n\r\nYou may pick your article up at <>.\r\n\r\nThank you!', 'email'), -('circulation', 'AR_OPEN', '', 'Article Request - Email - Open', 0, 'Article Request Recieved', '<> <> (<>)\r\n\r\nWe have received your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n\r\n\r\nThank you!', 'email'), +('circulation', 'AR_PENDING', '', 'Article Request - Email - Open', 0, 'Article Request Recieved', '<> <> (<>)\r\n\r\nWe have received your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n\r\n\r\nThank you!', 'email'), ('circulation', 'AR_SLIP', '', 'Article Request - Print Slip', 0, 'Test', 'Article Request:\r\n\r\n<> <> (<>)\r\n\r\nTitle: <>\r\nBarcode: <>\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n', 'print'), ('circulation', 'AR_PROCESSING', '', 'Article Request - Email - Processing', 0, 'Article Request Processing', '<> <> (<>)\r\n\r\nWe are now processing your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n\r\nThank you!', 'email'); --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ a/installer/data/mysql/en/mandatory/sample_notices.sql @@ -170,6 +170,6 @@ VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password r INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES ('circulation', 'AR_CANCELED', '', 'Article Request - Email - Canceled', 0, 'Article Request Canceled', '<> <> (<>)\r\n\r\nYour request for an article from <> (<>) has been canceled for the following reason:\r\n\r\n<>\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n', 'email'), ('circulation', 'AR_COMPLETED', '', 'Article Request - Email - Completed', 0, 'Article Request Completed', '<> <> (<>)\r\n\r\nWe are have completed your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n\r\nYou may pick your article up at <>.\r\n\r\nThank you!', 'email'), - ('circulation', 'AR_OPEN', '', 'Article Request - Email - Open', 0, 'Article Request Recieved', '<> <> (<>)\r\n\r\nWe have received your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n\r\n\r\nThank you!', 'email'), + ('circulation', 'AR_PENDING', '', 'Article Request - Email - Open', 0, 'Article Request Recieved', '<> <> (<>)\r\n\r\nWe have received your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n\r\n\r\nThank you!', 'email'), ('circulation', 'AR_SLIP', '', 'Article Request - Print Slip', 0, 'Test', 'Article Request:\r\n\r\n<> <> (<>)\r\n\r\nTitle: <>\r\nBarcode: <>\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n', 'print'), ('circulation', 'AR_PROCESSING', '', 'Article Request - Email - Processing', 0, 'Article Request Processing', '<> <> (<>)\r\n\r\nWe are now processing your request for an article from <> (<>).\r\n\r\nArticle requested:\r\nTitle: <>\r\nAuthor: <>\r\nVolume: <>\r\nIssue: <>\r\nDate: <>\r\nPages: <>\r\nChapters: <>\r\n\r\nThank you!', 'email'); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt @@ -110,13 +110,13 @@
-
- [% IF article_requests_open.count %] - +
+ [% IF article_requests_pending.count %] +
@@ -134,7 +134,7 @@ - [% FOREACH ar IN article_requests_open %] + [% FOREACH ar IN article_requests_pending %]
Title

@@ -235,7 +235,7 @@

[% ELSE %] - There are currently no open article requests. + There are currently no pending article requests. [% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt @@ -292,8 +292,8 @@ $(document).ready(function() { [% END %] - [% IF ar.status == 'OPEN' %] - Open + [% IF ar.status == 'PENDING' %] + Pending [% ELSIF ar.status == 'PROCESSING' %] Processing [% ELSIF ar.status == 'COMPLETED' %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -760,8 +760,8 @@ - [% IF ar.status == 'OPEN' %] - Open + [% IF ar.status == 'PENDING' %] + Pending [% ELSIF ar.status == 'PROCESSING' %] Processing [% ELSIF ar.status == 'COMPLETED' %] --- a/t/db_dependent/ArticleRequests.t +++ a/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' ); --