Bugzilla – Attachment 110399 Details for
Bug 25767
Add Koha::Item::Transfer->receive method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25767: (QA follow-up) receipt -> receive
Bug-25767-QA-follow-up-receipt---receive.patch (text/plain), 2.01 KB, created by
Martin Renvoize (ashimema)
on 2020-09-18 14:18:56 UTC
(
hide
)
Description:
Bug 25767: (QA follow-up) receipt -> receive
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-09-18 14:18:56 UTC
Size:
2.01 KB
patch
obsolete
>From 08e20b06531cd4ad9ba0aa691af8681c724a9c7e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 18 Sep 2020 15:17:58 +0100 >Subject: [PATCH] Bug 25767: (QA follow-up) receipt -> receive > >--- > Koha/Item/Transfer.pm | 6 +++--- > t/db_dependent/Koha/Item/Transfer.t | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/Koha/Item/Transfer.pm b/Koha/Item/Transfer.pm >index 80ba0458ba..6d65f88b8b 100644 >--- a/Koha/Item/Transfer.pm >+++ b/Koha/Item/Transfer.pm >@@ -84,19 +84,19 @@ sub transit { > return $self; > } > >-=head3 receipt >+=head3 receive > > Receive the transfer by setting the datearrived time. > > =cut > >-sub receipt { >+sub receive { > my ($self) = @_; > > # Throw exception if item is checked out > Koha::Exceptions::Item::Transfer::Out->throw() if ($self->item->checkout); > >- # Update the receipt state >+ # Update the arrived date > $self->set({ datearrived => dt_from_string })->store; > > ModDateLastSeen( $self->item->itemnumber ); >diff --git a/t/db_dependent/Koha/Item/Transfer.t b/t/db_dependent/Koha/Item/Transfer.t >index 2814acec5c..b82e2c8094 100644 >--- a/t/db_dependent/Koha/Item/Transfer.t >+++ b/t/db_dependent/Koha/Item/Transfer.t >@@ -113,7 +113,7 @@ subtest 'transit tests' => sub { > $schema->storage->txn_rollback; > }; > >-subtest 'receipt tests' => sub { >+subtest 'receive tests' => sub { > plan tests => 5; > > $schema->storage->txn_begin; >@@ -153,7 +153,7 @@ subtest 'receipt tests' => sub { > ); > is( ref($checkout), 'Koha::Checkout', 'Mock checkout added' ); > >- throws_ok { $transfer->receipt() } >+ throws_ok { $transfer->receive() } > 'Koha::Exceptions::Item::Transfer::Out', > 'Exception thrown if item is checked out'; > >@@ -161,7 +161,7 @@ subtest 'receipt tests' => sub { > > # Transit state set > $transfer->discard_changes; >- $transfer->receipt(); >+ $transfer->receive(); > ok( $transfer->datearrived, 'Receipt set the datearrived for the transfer' ); > > # Last seen >-- >2.20.1
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 25767
:
105905
|
105906
|
107244
|
107245
|
107299
|
107300
|
110277
|
110278
|
110299
|
110300
|
110397
|
110398
|
110399
|
110510
|
110511
|
110512
|
116550
|
116551
|
116552
|
117571
|
117583