Bug 25767

Summary: Add Koha::Item::Transfer->receive method
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: Architecture, internals, and plumbingAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: CLOSED FIXED QA Contact: Joonas Kylmälä <joonas.kylmala>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds the `Koha::Item::Transfer->receive` method to allow recording the receipt of a transfer at its destination. The method will throw an exception if the item is not checked in and it also handles setting DateLastSeen.
Version(s) released in:
21.05.00
Circulation function:
Bug Depends on: 25757    
Bug Blocks: 26481    
Attachments: Bug 25767: Add Koha::Item::Transfer->receipt method
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt
Bug 25767: Add Koha::Item::Transfer->receipt method
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt
Bug 25767: Add Koha::Item::Transfer->receipt method
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt
Bug 25767: Add Koha::Item::Transfer->receipt method
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt
Bug 25767: Add Koha::Item::Transfer->receipt method
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt
Bug 25767: Add Koha::Item::Transfer->receipt method
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt
Bug 25767: (QA follow-up) receipt -> receive
Bug 25767: Add Koha::Item::Transfer->receipt method
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt
Bug 25767: (QA follow-up) receipt -> receive
Bug 25767: Add Koha::Item::Transfer->receipt method
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt
Bug 25767: (QA follow-up) receipt -> receive
Bug 25767: Add Koha::Item::Transfer->receive method
Bug 25767: Add Koha::Item::Transfer->receive method

Description Martin Renvoize (ashimema) 2020-06-16 11:06:05 UTC
We should have a `receipt` method on the Koha::Item::Transfer object to allow marking the item as received and the transfer as complete.
Comment 1 Martin Renvoize (ashimema) 2020-06-16 11:21:40 UTC
Created attachment 105905 [details] [review]
Bug 25767: Add Koha::Item::Transfer->receipt method
Comment 2 Martin Renvoize (ashimema) 2020-06-16 11:21:43 UTC
Created attachment 105906 [details] [review]
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt
Comment 3 Martin Renvoize (ashimema) 2020-07-23 13:52:57 UTC
Created attachment 107244 [details] [review]
Bug 25767: Add Koha::Item::Transfer->receipt method
Comment 4 Martin Renvoize (ashimema) 2020-07-23 13:52:59 UTC
Created attachment 107245 [details] [review]
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt
Comment 5 Martin Renvoize (ashimema) 2020-07-23 13:53:22 UTC
Test plan
1/ Run the included unit tests and verify they pass
Comment 6 Martin Renvoize (ashimema) 2020-07-24 10:09:00 UTC
Created attachment 107299 [details] [review]
Bug 25767: Add Koha::Item::Transfer->receipt method
Comment 7 Martin Renvoize (ashimema) 2020-07-24 10:09:03 UTC
Created attachment 107300 [details] [review]
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt
Comment 8 Martin Renvoize (ashimema) 2020-09-17 16:23:33 UTC
Created attachment 110277 [details] [review]
Bug 25767: Add Koha::Item::Transfer->receipt method

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Comment 9 Martin Renvoize (ashimema) 2020-09-17 16:23:36 UTC
Created attachment 110278 [details] [review]
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Comment 10 Martin Renvoize (ashimema) 2020-09-17 16:24:11 UTC
Tested in use by Kathleen as part of relying on bug 22569
Comment 11 Katrin Fischer 2020-09-17 20:57:21 UTC
Created attachment 110299 [details] [review]
Bug 25767: Add Koha::Item::Transfer->receipt method

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2020-09-17 20:57:26 UTC
Created attachment 110300 [details] [review]
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2020-09-17 20:58:57 UTC
Blocked by dependent bug not ready yet.

Also a question: I wonder about the method name. As this is not just returning an object, but changing data receive would make a bit more sense to me than receipt (noun). What do you think?
Comment 14 Martin Renvoize (ashimema) 2020-09-18 08:00:28 UTC
(In reply to Katrin Fischer from comment #13)
> Blocked by dependent bug not ready yet.
> 
> Also a question: I wonder about the method name. As this is not just
> returning an object, but changing data receive would make a bit more sense
> to me than receipt (noun). What do you think?

Well.. in British English at least you can use receipt as both a noun and a verb.. 

noun
1. a document acknowledging that a person has received money or property in payment following a sale or other transfer of goods or provision of a service

verb
1. the action of receiving something or the fact of its being received.
2. to mark (a bill) as paid.

But I do see your point and perhaps receive is more in keeping with other terms in Koha already, and will be more internationally understood.
Comment 15 Martin Renvoize (ashimema) 2020-09-18 14:18:49 UTC
Created attachment 110397 [details] [review]
Bug 25767: Add Koha::Item::Transfer->receipt method

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Martin Renvoize (ashimema) 2020-09-18 14:18:52 UTC
Created attachment 110398 [details] [review]
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Martin Renvoize (ashimema) 2020-09-18 14:18:56 UTC
Created attachment 110399 [details] [review]
Bug 25767: (QA follow-up) receipt -> receive
Comment 18 Katrin Fischer 2020-09-21 20:59:19 UTC
Created attachment 110510 [details] [review]
Bug 25767: Add Koha::Item::Transfer->receipt method

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Katrin Fischer 2020-09-21 20:59:25 UTC
Created attachment 110511 [details] [review]
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 20 Katrin Fischer 2020-09-21 20:59:31 UTC
Created attachment 110512 [details] [review]
Bug 25767: (QA follow-up) receipt -> receive

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 21 Martin Renvoize (ashimema) 2021-02-09 11:00:51 UTC
Created attachment 116550 [details] [review]
Bug 25767: Add Koha::Item::Transfer->receipt method

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 22 Martin Renvoize (ashimema) 2021-02-09 11:00:55 UTC
Created attachment 116551 [details] [review]
Bug 25767: Add unit tests for Koha::Item::Transfer->receipt

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 23 Martin Renvoize (ashimema) 2021-02-09 11:00:58 UTC
Created attachment 116552 [details] [review]
Bug 25767: (QA follow-up) receipt -> receive

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 24 Jonathan Druart 2021-03-03 13:43:16 UTC
Created attachment 117571 [details] [review]
Bug 25767: Add Koha::Item::Transfer->receive method

Was Bug 25767: Add Koha::Item::Transfer->receipt method

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Bug 25767: Add unit tests for Koha::Item::Transfer->receipt

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Bug 25767: (QA follow-up) receipt -> receive

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 25 Jonathan Druart 2021-03-03 14:29:59 UTC
Created attachment 117583 [details] [review]
Bug 25767: Add Koha::Item::Transfer->receive method

Was Bug 25767: Add Koha::Item::Transfer->receipt method

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Bug 25767: Add unit tests for Koha::Item::Transfer->receipt

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Bug 25767: (QA follow-up) receipt -> receive

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 26 Jonathan Druart 2021-03-03 14:36:49 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 27 Fridolin Somers 2021-03-04 12:23:45 UTC
Enhancement not pushed to 20.11.x