Bug 17458 - When receiving an order, information about user and date on top are incorrect
Summary: When receiving an order, information about user and date on top are incorrect
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-17 15:59 UTC by Marjorie Barry-Vila
Modified: 2021-06-14 21:33 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00
Circulation function:


Attachments
Bug 17458: Fix information shown on top of order receive page (3.21 KB, patch)
2020-04-19 00:55 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 17458: Fix information shown on top of order receive page (3.27 KB, patch)
2020-04-20 10:46 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 17458: Remove use of datereceived from order receive page (5.46 KB, patch)
2020-08-14 13:43 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 17458: Remove use of datereceived from order receive page (5.51 KB, patch)
2020-09-17 21:28 UTC, David Nind
Details | Diff | Splinter Review
Bug 17458: Remove use of datereceived from order receive page (5.57 KB, patch)
2020-09-25 10:37 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marjorie Barry-Vila 2016-10-17 15:59:04 UTC
Hi,

When we just consult receipt summary (parcel.pl), the ID of logged user is displayed in field "Received by"
But effective receipt were done by someone else.

Id of user who done receipt is logged somewhere?

Regards,
Marjorie
Comment 1 Katrin Fischer 2020-04-19 00:40:27 UTC
It indeed always displayed the current user:

<strong>Received by:</strong> [% logged_in_user.userid | html %]

This is on the receive, not on the invoice page, although both are linked of course.

We don't store who started/created an invoice. 

Also: The orders in a shipment/invoice could have been processed by different people, it makes no sense to display a single user at the top, when it can vary for different entries on the page.

So I think best is to remove the misleading information.
Comment 2 Katrin Fischer 2020-04-19 00:45:58 UTC
Actually, the same is true for the "On" date. It always displays today's date...
Comment 3 Katrin Fischer 2020-04-19 00:55:31 UTC
Created attachment 103208 [details] [review]
Bug 17458: Fix information shown on top of order receive page

Before this patch the order receive page (parcel.pl) would show
... Received by: <current user> On: <current date>

This is not really helpful. Whenever you viewed an invoice, it
would tell you it was _you_ who received that _today_.

As we don't store a creator of an invoice and the order lines
in an invoice could have been received by different people (which
we also don't know about), the "Received by" is removed by this patch.

Instead of today's date, we can show the shipment date entered for
the invoice. Again: different order lines could have been received
on different dates for this shipment.

To test:
- Create a basket with some orders in acq
- Close the basket
- Receive shipment and create an invoice
  - Make sure shipment date is not set to today
- Verify the information shown on top of parcel.pl is you and today
- Change staff users
- Go to your invoice, it's now this user and today
- Apply patch
- Received by: should be gone and the On: replaced by Shipment date:
  with the date you selected

If you have older invoices in your system, it would work
even better with these as you'd see that always today's date
is displaying without the patch.
Comment 4 ByWater Sandboxes 2020-04-20 10:46:09 UTC
Created attachment 103263 [details] [review]
Bug 17458: Fix information shown on top of order receive page

Before this patch the order receive page (parcel.pl) would show
... Received by: <current user> On: <current date>

This is not really helpful. Whenever you viewed an invoice, it
would tell you it was _you_ who received that _today_.

As we don't store a creator of an invoice and the order lines
in an invoice could have been received by different people (which
we also don't know about), the "Received by" is removed by this patch.

Instead of today's date, we can show the shipment date entered for
the invoice. Again: different order lines could have been received
on different dates for this shipment.

To test:
- Create a basket with some orders in acq
- Close the basket
- Receive shipment and create an invoice
  - Make sure shipment date is not set to today
- Verify the information shown on top of parcel.pl is you and today
- Change staff users
- Go to your invoice, it's now this user and today
- Apply patch
- Received by: should be gone and the On: replaced by Shipment date:
  with the date you selected

If you have older invoices in your system, it would work
even better with these as you'd see that always today's date
is displaying without the patch.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Comment 5 Katrin Fischer 2020-04-20 11:29:39 UTC
Thx Marjorie!
Comment 6 Jonathan Druart 2020-04-20 11:58:30 UTC
Katrin, there are occurrences of "datereceived" in the template, however you removed it from the .pl file.
Comment 7 Katrin Fischer 2020-08-14 13:43:28 UTC
Created attachment 108279 [details] [review]
Bug 17458: Remove use of datereceived from order receive page

Before this patch the order receive page (parcel.pl) would show
... Received by: <current user> On: <current date>

This is not really helpful. Whenever you viewed an invoice, it
would tell you it was _you_ who received that _today_.

As we don't store a creator of an invoice and the order lines
in an invoice could have been received by different people (which
we also don't know about), the "Received by" is removed by this patch.

Instead of today's date, we can show the shipment date entered for
the invoice. Again: different order lines could have been received
on different dates for this shipment. So only the shipment date makes
sense as it's on invoice level.

This also makes changes to the page title, breadcrumby and page heading:
When the invoice is closed, they will read:
  Receipt summary for [vendor] ...
When the invoice is not closed, they wil read:
  Receive orders from [vendor] ...

To test:
- Create a basket with some orders in acq
- Close the basket
- Receive shipment and create an invoice
  - Make sure shipment date is not set to today
- Verify the information shown on top of parcel.pl is you and today
- Change staff users
- Go to your invoice, it's now this user and today
- Apply patch
- Received by: should be gone and the On: replaced by Shipment date:
  with the date you selected
- Check the page title, breadcrumbs and headings read all the same 'Receive orders...'
- Finish receiving and close the invoice
- "Go to receipt page"
- Verify they now read "Receipt summary.."

If you have older invoices in your system, it would work
even better with these as you'd see that always today's date
is displaying without the patch.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Comment 8 Katrin Fischer 2020-08-14 13:46:01 UTC
I am sorry, this should have been a follow-up - I hadn't realized that Marjorie had already signed off.

I removed the other datereceived calls after looking at the template some more. It doesn't make sense to have checks for today's date... it's always there!
Comment 9 Katrin Fischer 2020-08-14 13:46:42 UTC
Test plan was amended, these are the new bits:

This also makes changes to the page title, breadcrumby and page heading:
When the invoice is closed, they will read:
  Receipt summary for [vendor] ...
When the invoice is not closed, they wil read:
  Receive orders from [vendor] ...

...
- Check the page title, breadcrumbs and headings read all the same 'Receive orders...'
- Finish receiving and close the invoice
- "Go to receipt page"
- Verify they now read "Receipt summary.."
Comment 10 David Nind 2020-09-17 21:28:44 UTC
Created attachment 110302 [details] [review]
Bug 17458: Remove use of datereceived from order receive page

Before this patch the order receive page (parcel.pl) would show
... Received by: <current user> On: <current date>

This is not really helpful. Whenever you viewed an invoice, it
would tell you it was _you_ who received that _today_.

As we don't store a creator of an invoice and the order lines
in an invoice could have been received by different people (which
we also don't know about), the "Received by" is removed by this patch.

Instead of today's date, we can show the shipment date entered for
the invoice. Again: different order lines could have been received
on different dates for this shipment. So only the shipment date makes
sense as it's on invoice level.

This also makes changes to the page title, breadcrumby and page heading:
When the invoice is closed, they will read:
  Receipt summary for [vendor] ...
When the invoice is not closed, they wil read:
  Receive orders from [vendor] ...

To test:
- Create a basket with some orders in acq
- Close the basket
- Receive shipment and create an invoice
  - Make sure shipment date is not set to today
- Verify the information shown on top of parcel.pl is you and today
- Change staff users
- Go to your invoice, it's now this user and today
- Apply patch
- Received by: should be gone and the On: replaced by Shipment date:
  with the date you selected
- Check the page title, breadcrumbs and headings read all the same 'Receive orders...'
- Finish receiving and close the invoice
- "Go to receipt page"
- Verify they now read "Receipt summary.."

If you have older invoices in your system, it would work
even better with these as you'd see that always today's date
is displaying without the patch.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 Martin Renvoize (ashimema) 2020-09-25 10:37:52 UTC
Created attachment 110744 [details] [review]
Bug 17458: Remove use of datereceived from order receive page

Before this patch the order receive page (parcel.pl) would show
... Received by: <current user> On: <current date>

This is not really helpful. Whenever you viewed an invoice, it
would tell you it was _you_ who received that _today_.

As we don't store a creator of an invoice and the order lines
in an invoice could have been received by different people (which
we also don't know about), the "Received by" is removed by this patch.

Instead of today's date, we can show the shipment date entered for
the invoice. Again: different order lines could have been received
on different dates for this shipment. So only the shipment date makes
sense as it's on invoice level.

This also makes changes to the page title, breadcrumby and page heading:
When the invoice is closed, they will read:
  Receipt summary for [vendor] ...
When the invoice is not closed, they wil read:
  Receive orders from [vendor] ...

To test:
- Create a basket with some orders in acq
- Close the basket
- Receive shipment and create an invoice
  - Make sure shipment date is not set to today
- Verify the information shown on top of parcel.pl is you and today
- Change staff users
- Go to your invoice, it's now this user and today
- Apply patch
- Received by: should be gone and the On: replaced by Shipment date:
  with the date you selected
- Check the page title, breadcrumbs and headings read all the same 'Receive orders...'
- Finish receiving and close the invoice
- "Go to receipt page"
- Verify they now read "Receipt summary.."

If you have older invoices in your system, it would work
even better with these as you'd see that always today's date
is displaying without the patch.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize (ashimema) 2020-09-25 10:38:22 UTC
Well sleuthed, it's clearer now.

Passing QA
Comment 13 Jonathan Druart 2020-09-28 14:11:18 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 14 Lucas Gass (lukeg) 2020-10-20 14:22:05 UTC
doesnt apply clean to 20.05.x, no backport