Bugzilla – Attachment 125544 Details for
Bug 27944
Add new stages to the article request process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27944: (follow-up) Add POD
Bug-27944-follow-up-Add-POD.patch (text/plain), 4.25 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-09-30 14:57:54 UTC
(
hide
)
Description:
Bug 27944: (follow-up) Add POD
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-09-30 14:57:54 UTC
Size:
4.25 KB
patch
obsolete
>From 7998b9c297953ec1ea19bbe53890b17a91ccc2aa Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 30 Sep 2021 11:55:11 -0300 >Subject: [PATCH] Bug 27944: (follow-up) Add POD > >The library didn't contain real POD. This patch adds it. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/ArticleRequest.pm | 99 ++++++++++++++++++++++++++---------------- > 1 file changed, 62 insertions(+), 37 deletions(-) > >diff --git a/Koha/ArticleRequest.pm b/Koha/ArticleRequest.pm >index 71a106d3f7..82437089c9 100644 >--- a/Koha/ArticleRequest.pm >+++ b/Koha/ArticleRequest.pm >@@ -42,6 +42,10 @@ Koha::ArticleRequest - Koha Article Request Object class > > =head3 request > >+ $article_request->request; >+ >+Marks the article as requested. Send a notification if appropriate. >+ > =cut > > sub request { >@@ -55,6 +59,10 @@ sub request { > > =head3 set_pending > >+ $article_request->set_pending; >+ >+Marks the article as pending. Send a notification if appropriate. >+ > =cut > > sub set_pending { >@@ -68,6 +76,10 @@ sub set_pending { > > =head3 process > >+ $article_request->process; >+ >+Marks the article as in process. Send a notification if appropriate. >+ > =cut > > sub process { >@@ -81,6 +93,10 @@ sub process { > > =head3 complete > >+ $article_request->complete; >+ >+Marks the article as completed. Send a notification if appropriate. >+ > =cut > > sub complete { >@@ -94,6 +110,10 @@ sub complete { > > =head3 cancel > >+ $article_request->cancel; >+ >+Marks the article as cancelled. Send a notification if appropriate. >+ > =cut > > sub cancel { >@@ -106,43 +126,6 @@ sub cancel { > return $self; > } > >-=head3 notify >- >-=cut >- >-sub notify { >- my ($self) = @_; >- >- my $status = $self->status; >- >- require C4::Letters; >- if ( >- my $letter = C4::Letters::GetPreparedLetter( >- module => 'circulation', >- letter_code => "AR_$status", # AR_REQUESTED, AR_PENDING, AR_PROCESSING, AR_COMPLETED, AR_CANCELED >- message_transport_type => 'email', >- lang => $self->borrower->lang, >- tables => { >- article_requests => $self->id, >- borrowers => $self->borrowernumber, >- biblio => $self->biblionumber, >- biblioitems => $self->biblionumber, >- items => $self->itemnumber, >- branches => $self->branchcode, >- }, >- ) >- ) >- { >- C4::Letters::EnqueueLetter( >- { >- letter => $letter, >- borrowernumber => $self->borrowernumber, >- message_transport_type => 'email', >- } >- ) or warn "can't enqueue letter ". $letter->{code}; >- } >-} >- > =head3 biblio > > Returns the Koha::Biblio object for this article request >@@ -218,6 +201,48 @@ sub store { > > =head2 Internal methods > >+=head3 notify >+ >+ $self->notify(); >+ >+internal method to be called when changing an article request status. >+If a letter exists for the new status, it enqueues it. >+ >+=cut >+ >+sub notify { >+ my ($self) = @_; >+ >+ my $status = $self->status; >+ >+ require C4::Letters; >+ if ( >+ my $letter = C4::Letters::GetPreparedLetter( >+ module => 'circulation', >+ letter_code => "AR_$status", # AR_REQUESTED, AR_PENDING, AR_PROCESSING, AR_COMPLETED, AR_CANCELED >+ message_transport_type => 'email', >+ lang => $self->borrower->lang, >+ tables => { >+ article_requests => $self->id, >+ borrowers => $self->borrowernumber, >+ biblio => $self->biblionumber, >+ biblioitems => $self->biblionumber, >+ items => $self->itemnumber, >+ branches => $self->branchcode, >+ }, >+ ) >+ ) >+ { >+ C4::Letters::EnqueueLetter( >+ { >+ letter => $letter, >+ borrowernumber => $self->borrowernumber, >+ message_transport_type => 'email', >+ } >+ ) or warn "can't enqueue letter ". $letter->{code}; >+ } >+} >+ > =head3 _type > > =cut >-- >2.33.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 27944
:
119020
|
119021
|
119022
|
120454
|
122673
|
122836
|
122837
|
122838
|
122839
|
122842
|
122843
|
122857
|
122984
|
122985
|
122986
|
122987
|
122988
|
122989
|
122990
|
123710
|
123711
|
123712
|
123943
|
123944
|
123945
|
123946
|
123947
|
123948
|
123949
|
123950
|
123951
|
123952
|
124966
|
124967
|
124968
|
124969
|
124970
|
124971
|
124972
|
124973
|
124974
|
124975
|
124976
|
125158
| 125544 |
125565
|
125567
|
125762
|
125813