Bug 24277 - Date Received in acquisitions cannot be changed
Summary: Date Received in acquisitions cannot be changed
Status: Pushed to oldoldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 8417 13321
Blocks:
  Show dependency treegraph
 
Reported: 2019-12-19 16:04 UTC by Andrew Fuerste-Henry
Modified: 2020-02-10 02:43 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.02, 19.05.08, 18.11.14


Attachments
Bug 24277: Fix date received editing when receiving an order (2.47 KB, patch)
2019-12-23 15:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24277: Fix date received editing when receiving an order (2.54 KB, patch)
2019-12-23 17:44 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 24277: Regression tests (1.93 KB, patch)
2020-01-08 13:58 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 24277: Fix date received editing when receiving an order (2.59 KB, patch)
2020-01-08 13:58 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2019-12-19 16:04:08 UTC
When receiving an order on orderreceive.pl, Koha gives one a date picker with which to change the Date Received. However, regardless of what one enters in the date picker today's date is used.

To Test:
- find/create an order ready for receipt
- when receiving the order, set Date Received to something other than today's date
- after receiving, check Receive Date in the Acquisitions tab of your bib (or query aqorders.datereceived), confirm it shows today's date

I tried setting the shipment date on the invoice to something other than today, in case that made a difference, but it didn't help.
Comment 1 Katrin Fischer 2019-12-22 11:41:52 UTC
Haven't tested, but could this change the items.dateaccessioned instead?
Comment 2 Jonathan Druart 2019-12-23 15:09:26 UTC
Caused by
  commit 20d9ed618fbe3cdcb9c04444a1f8a584b0364069
  Bug 13321: Rename variables

It removed datereceived from the arguments passed to ModReceiveOrder (wrong rebase resolution conflict I suspect).
Comment 3 Jonathan Druart 2019-12-23 15:22:14 UTC
Created attachment 96611 [details] [review]
Bug 24277: Fix date received editing when receiving an order

Bug 8417 added the ability to edit the date received, but a merge
conflict was wrongly resolved during a rebase of
  commit 20d9ed618fbe3cdcb9c04444a1f8a584b0364069
  Bug 13321: Rename variables

Test plan:
Create an order
Receive it
Set a date (different from today)
=> The date you picked should have been set in DB for the order
Comment 4 ByWater Sandboxes 2019-12-23 17:44:46 UTC
Created attachment 96614 [details] [review]
Bug 24277: Fix date received editing when receiving an order

Bug 8417 added the ability to edit the date received, but a merge
conflict was wrongly resolved during a rebase of
  commit 20d9ed618fbe3cdcb9c04444a1f8a584b0364069
  Bug 13321: Rename variables

Test plan:
Create an order
Receive it
Set a date (different from today)
=> The date you picked should have been set in DB for the order

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 5 Andrew Fuerste-Henry 2019-12-23 17:48:30 UTC
Works for me. Thanks for the quick patch!
Comment 6 Katrin Fischer 2019-12-29 15:55:21 UTC
Comment on attachment 96614 [details] [review]
Bug 24277: Fix date received editing when receiving an order

Review of attachment 96614 [details] [review]:
-----------------------------------------------------------------

::: C4/Acquisition.pm
@@ -1398,2 @@
>              received_itemnumbers => \@received_itemnumbers,
> -            order_internalnote   => $order_internalnote,

Was this change intentional?
Comment 7 Jonathan Druart 2020-01-06 22:20:37 UTC
(In reply to Katrin Fischer from comment #6)
> Comment on attachment 96614 [details] [review] [review]
> Bug 24277: Fix date received editing when receiving an order
> 
> Review of attachment 96614 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: C4/Acquisition.pm
> @@ -1398,2 @@
> >              received_itemnumbers => \@received_itemnumbers,
> > -            order_internalnote   => $order_internalnote,
> 
> Was this change intentional?

Yes, it's a POD update. It's not part of the param list.
Comment 8 Katrin Fischer 2020-01-06 22:21:59 UTC
(In reply to Jonathan Druart from comment #7)
> (In reply to Katrin Fischer from comment #6)
> > Comment on attachment 96614 [details] [review] [review] [review]
> > Bug 24277: Fix date received editing when receiving an order
> > 
> > Review of attachment 96614 [details] [review] [review] [review]:
> > -----------------------------------------------------------------
> > 
> > ::: C4/Acquisition.pm
> > @@ -1398,2 @@
> > >              received_itemnumbers => \@received_itemnumbers,
> > > -            order_internalnote   => $order_internalnote,
> > 
> > Was this change intentional?
> 
> Yes, it's a POD update. It's not part of the param list.

Oops, sorry.
Comment 9 Tomás Cohen Arazi 2020-01-08 13:58:46 UTC
Created attachment 96993 [details] [review]
Bug 24277: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 10 Tomás Cohen Arazi 2020-01-08 13:58:49 UTC
Created attachment 96994 [details] [review]
Bug 24277: Fix date received editing when receiving an order

Bug 8417 added the ability to edit the date received, but a merge
conflict was wrongly resolved during a rebase of
  commit 20d9ed618fbe3cdcb9c04444a1f8a584b0364069
  Bug 13321: Rename variables

Test plan:
Create an order
Receive it
Set a date (different from today)
=> The date you picked should have been set in DB for the order

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Martin Renvoize 2020-01-08 14:27:19 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 12 Joy Nelson 2020-01-18 15:55:36 UTC
Pushed to 19.11.x branch for 19.11.02
Comment 13 Lucas Gass 2020-02-05 21:20:17 UTC
backported to 19.05.x for 19.05.08
Comment 14 Hayley Mapley 2020-02-10 02:43:24 UTC
Backported to 18.11.x for 18.11.14.