Bug 31586 - Log basket number as object when an email order is sent
Summary: Log basket number as object when an email order is sent
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-20 12:06 UTC by Katrin Fischer
Modified: 2023-12-28 20:42 UTC (History)
2 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:
22.11.00


Attachments
Bug 31586: Log basket number as object for action ACQUISITION ORDER (3.14 KB, patch)
2022-09-20 12:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31586: Log basket number as object for action ACQUISITION ORDER (3.12 KB, patch)
2022-09-20 12:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31586: Log basket number as object for action ACQUISITION ORDER (3.18 KB, patch)
2022-09-21 16:25 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 31586: Log basket number as object for action ACQUISITION ORDER (3.24 KB, patch)
2022-10-03 12:03 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2022-09-20 12:06:32 UTC
At the moment reporting on sent out order emails is complicated by the fact that the ordernumber is not available in the log entries. The object is left empty and should be set to the basketno.
Comment 1 Katrin Fischer 2022-09-20 12:46:48 UTC
Created attachment 140784 [details] [review]
Bug 31586: Log basket number as object for action ACQUISITION ORDER

Until now we logged undef as object in action_logs when an email
order was sent. With this patch the basket number is logged instead,
which will allow for reporting and also allows us to display a link
to the basket, if permissions permit (order manage), in the log
viewer.

To test:
- Make sure the ClaimsLog system preference is set to Log
- Create a vendor or make sure an existing vendor has an email set
- Make sure to add an SMTP server and link it to your library
- Create a basket in acqisitions and add an order line
- Click "E-mail order" to send the email
- Go to the log viewer, limit to module Acquisitions
- Verify that the entry show with a link to the basket in the
  Object column
  If the user doesn't have order_manage permission, the basket
  number will still show, but isn't linked
Comment 2 Katrin Fischer 2022-09-20 12:47:36 UTC
Created attachment 140785 [details] [review]
Bug 31586: Log basket number as object for action ACQUISITION ORDER

Until now we logged undef as object in action_logs when an email
order was sent. With this patch the basket number is logged instead,
which will allow for reporting and also allows us to display a link
to the basket, if permissions permit (order manage), in the log
viewer.

To test:
- Make sure the ClaimsLog system preference is set to Log
- Create a vendor or make sure an existing vendor has an email set
- Make sure to add an SMTP server and link it to your library
- Create a basket in acqisitions and add an order line
- Click "E-mail order" to send the email
- Go to the log viewer, limit to module Acquisitions
- Verify that the entry show with a link to the basket in the
  Object column
  If the user doesn't have order_manage permission, the basket
  number will still show, but isn't linked
Comment 3 ByWater Sandboxes 2022-09-21 16:25:48 UTC
Created attachment 140825 [details] [review]
Bug 31586: Log basket number as object for action ACQUISITION ORDER

Until now we logged undef as object in action_logs when an email
order was sent. With this patch the basket number is logged instead,
which will allow for reporting and also allows us to display a link
to the basket, if permissions permit (order manage), in the log
viewer.

To test:
- Make sure the ClaimsLog system preference is set to Log
- Create a vendor or make sure an existing vendor has an email set
- Make sure to add an SMTP server and link it to your library
- Create a basket in acqisitions and add an order line
- Click "E-mail order" to send the email
- Go to the log viewer, limit to module Acquisitions
- Verify that the entry show with a link to the basket in the
  Object column
  If the user doesn't have order_manage permission, the basket
  number will still show, but isn't linked

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Comment 4 Nick Clemens 2022-10-03 12:03:56 UTC
Created attachment 141258 [details] [review]
Bug 31586: Log basket number as object for action ACQUISITION ORDER

Until now we logged undef as object in action_logs when an email
order was sent. With this patch the basket number is logged instead,
which will allow for reporting and also allows us to display a link
to the basket, if permissions permit (order manage), in the log
viewer.

To test:
- Make sure the ClaimsLog system preference is set to Log
- Create a vendor or make sure an existing vendor has an email set
- Make sure to add an SMTP server and link it to your library
- Create a basket in acqisitions and add an order line
- Click "E-mail order" to send the email
- Go to the log viewer, limit to module Acquisitions
- Verify that the entry show with a link to the basket in the
  Object column
  If the user doesn't have order_manage permission, the basket
  number will still show, but isn't linked

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Tomás Cohen Arazi 2022-10-03 17:37:17 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!