Bugzilla – Attachment 165284 Details for
Bug 25996
Changes to restrictions should be logged
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25996: Add restrictions to the log viewer
Bug-25996-Add-restrictions-to-the-log-viewer.patch (text/plain), 4.14 KB, created by
ByWater Sandboxes
on 2024-04-22 13:17:51 UTC
(
hide
)
Description:
Bug 25996: Add restrictions to the log viewer
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2024-04-22 13:17:51 UTC
Size:
4.14 KB
patch
obsolete
>From a383bfcb26ad651afbb7ce3a07f5a342578cb591 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 22 Apr 2024 00:07:48 -0300 >Subject: [PATCH] Bug 25996: Add restrictions to the log viewer > >This patch adds the new log actions, related to restrictions, to the log >viewer. > >To test: >0. Set BorrowersLog to 'Log' >1. Pick a patron >2. Add a restriction and identify it's id, maybe using the DB: > $ ktd --shell > k$ koha-mysql kohadev > > SELECT * FROM borrower_debarments; >3. Run [1]: > k$ perl -MKoha::Patron::Debarments \ > -e 'Koha::Patron::Debarments::ModDebarment( { borrower_debarment_id => 195, comment => "potato" } );' >4. Visit the log viewer. >=> SUCCESS: You can filter on 'Create restriction', 'Modify restriction' >and 'Delete restriction', things are displayed correctly. > >[1] There's the ModDebarment method in the codebase, but I couldn't find >a way to trigger it for testing, so my last resort was to do it from the >CLI, manually. The tests on the previous patches cover the method >anyway. > >Sponsored-by: Karlsruhe Institute of Technology (KIT) >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >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 8afd131d24..6b99b08547 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -145,6 +145,9 @@ > [% CASE 'CREATE_FUND' %]<span>Create a fund</span> > [% CASE 'MODIFY_FUND' %]<span>Modify a fund</span> > [% CASE 'DELETE_FUND' %]<span>Delete a fund</span> >+[% CASE 'CREATE_RESTRICTION' %]<span>Create restriction</span> >+[% CASE 'MODIFY_RESTRICTION' %]<span>Modify restriction</span> >+[% CASE 'DELETE_RESTRICTION' %]<span>Delete restriction</span> > [% CASE 'Run' %]<span>Run</span> > [% CASE 'End' %]<span>End</span> > [% CASE 'EDIT_MAPPINGS' %]<span>Edit mappings</span> >@@ -240,7 +243,7 @@ > <label for="actionALL" class="viewlog"><input type="checkbox" id="actionALL" name="actions" value=""> All</label> > [% END %] > >- [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'FILL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'MODCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'PATRON_NOTICE' 'CHANGE PASS' 'RESET PASS' 'Run' 'End' 'EDIT_MAPPINGS' 'RESET_MAPPINGS' 'ADD_BASKET' 'MODIFY_BASKET' 'MODIFY_BASKET_HEADER' 'MODIFY_BASKET_USERS' 'CLOSE_BASKET' 'APPROVE_BASKET' 'REOPEN_BASKET' 'CANCEL_ORDER' 'CREATE_ORDER' 'MODIFY_ORDER' 'CREATE_INVOICE_ADJUSTMENT' 'UPDATE_INVOICE_ADJUSTMENT' 'DELETE_INVOICE_ADJUSTMENT' 'RECEIVE_ORDER' 'MODIFY_BUDGET' 'MODIFY_FUND' 'CREATE_FUND' 'DELETE_FUND' 'ACQUISITION CLAIM' 'ACQUISITION ORDER' 'OVERDUE' 'EXPIRE' ] %] >+ [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'FILL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'MODCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'PATRON_NOTICE' 'CHANGE PASS' 'RESET PASS' 'Run' 'End' 'EDIT_MAPPINGS' 'RESET_MAPPINGS' 'ADD_BASKET' 'MODIFY_BASKET' 'MODIFY_BASKET_HEADER' 'MODIFY_BASKET_USERS' 'CLOSE_BASKET' 'APPROVE_BASKET' 'REOPEN_BASKET' 'CANCEL_ORDER' 'CREATE_ORDER' 'MODIFY_ORDER' 'CREATE_INVOICE_ADJUSTMENT' 'UPDATE_INVOICE_ADJUSTMENT' 'DELETE_INVOICE_ADJUSTMENT' 'RECEIVE_ORDER' 'MODIFY_BUDGET' 'MODIFY_FUND' 'CREATE_FUND' 'DELETE_FUND' 'ACQUISITION CLAIM' 'ACQUISITION ORDER' 'OVERDUE' 'EXPIRE' 'CREATE_RESTRICTION' 'MODIFY_RESTRICTION' 'DELETE_RESTRICTION' ] %] > [% IF actions.grep(actx).size %] > <label for="action[% actx| replace('\s+', '_') | html %]" class="viewlog"><input type="checkbox" id="action[% actx | replace('\s+', '_') | html %]" name="actions" value="[% actx | html %]" checked="checked"> [% PROCESS translate_log_action action=actx %]</label> > [% ELSE %] >-- >2.39.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 25996
:
165244
|
165245
|
165246
|
165247
|
165267
|
165281
|
165282
|
165283
|
165284
|
165285
|
166056
|
166057
|
166058
|
166059
|
166060