From 26edce2088bc6d20efaae2d2e778188b8a0edf6b Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 19 Feb 2024 16:19:12 +0000 Subject: [PATCH] Bug 36118: Update status and send notice core actions logging 1) Enable ILLlog sys pref 2) Enable ILLModule and install 'FreeForm', run: bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) 3) Create a new FreeForm request, visit: /cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm 4) Pick a type, insert '42' on cardnumber and pick a library, hit 'Create' 5) On the next screen, click 'Confirm request' and confirm. 6) Click 'ILL request log', notice the entry is there but has no information about who did the logged action. 7) Apply patches. Repeat steps 3) to 6). Notice the logged action now has information about the user who did the action. 8) Extra: Click 'Send notice to patron' and confirm that action is also logged with patron information. To my knowledge, these are the only 2 actions logged by core Logger. Backends logging their own actions that want patron information need to add it themselves following this pattern. Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/en/modules/ill/log/patron_notice.tt | 4 +++- .../intranet-tmpl/prog/en/modules/ill/log/status_change.tt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/log/patron_notice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/log/patron_notice.tt index 76287896235..8dbbf77c823 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/log/patron_notice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/log/patron_notice.tt @@ -1,6 +1,8 @@ [% USE KohaDates %]

-[% log.timestamp | $KohaDates with_hours => 1 %] : Patron notice sent: +[% log.timestamp | $KohaDates with_hours => 1 %] : +[%- INCLUDE 'patron-title.inc' patron => log.patron hide_patron_infos_if_needed => 1 -%] +- Patron notice sent: [% notice_code = log.info.notice_code %] "[% log.notice_types.$notice_code.name | html %]"

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/log/status_change.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/log/status_change.tt index 5c184431652..9b5282cef47 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/log/status_change.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/log/status_change.tt @@ -1,6 +1,8 @@ [% USE KohaDates %]

-[% log.timestamp | $KohaDates with_hours => 1 %] : Status changed +[% log.timestamp | $KohaDates with_hours => 1 %] : +[%- INCLUDE 'patron-title.inc' patron => log.patron hide_patron_infos_if_needed => 1 -%] +- Status changed [% IF log.info.status_before %] [% before = log.info.status_before %] [% display_before = log.aliases.$before ? log.aliases.$before.lib : request.capabilities.$before.name %] -- 2.44.0