Bugzilla – Attachment 140785 Details for
Bug 31586
Log basket number as object when an email order is sent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31586: Log basket number as object for action ACQUISITION ORDER
Bug-31586-Log-basket-number-as-object-for-action-A.patch (text/plain), 3.12 KB, created by
Katrin Fischer
on 2022-09-20 12:47:36 UTC
(
hide
)
Description:
Bug 31586: Log basket number as object for action ACQUISITION ORDER
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-09-20 12:47:36 UTC
Size:
3.12 KB
patch
obsolete
>From ed795a1d0f11cfdc0d8053cf2f53155adcbb5ff2 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Tue, 20 Sep 2022 12:47:15 +0000 >Subject: [PATCH] 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 >--- > C4/Letters.pm | 3 ++- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt | 6 ++++++ > 2 files changed, 8 insertions(+), 1 deletion(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index bde0d2b0dc..781ad8372d 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -516,11 +516,12 @@ sub SendAlerts { > return { error => $error } > unless $success; > >+ my $log_object = $action eq 'ACQUISITION ORDER' ? $externalid : undef; > my $module = $action eq 'ACQUISITION ORDER' ? 'ACQUISITIONS' : 'CLAIMS'; > logaction( > $module, > $action, >- undef, >+ $log_object, > "To=" > . join( ',', @email ) > . " Title=" >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >index 24fc22f669..d2c427d84c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -376,6 +376,12 @@ > [% ELSE %] > Biblio-level recall on <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.recall.biblio_id | uri %]">biblio</a> > [% END %] >+ [% ELSIF ( loopro.module == 'ACQUISITIONS' && loopro.action == 'ACQUISITION ORDER' && loopro.object ) %] >+ [% IF ( CAN_user_acquisition_order_manage ) %] >+ Basket <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% loopro.object | uri %]">[% loopro.object | html %]</a> >+ [% ELSE %] >+ Basket [% loopro.object | html %] >+ [% END %] > [% ELSE %] > [% loopro.object | html %] > [% END %] >-- >2.30.2
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 31586
:
140784
|
140785
|
140825
|
141258