Bug 14233: Add logging support to notices and slips management
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 7 Apr 2021 13:02:17 +0000 (15:02 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 9 Apr 2021 13:45:12 +0000 (15:45 +0200)
commit058884ed4f41e97d7bf0957156cf2a0b99bb33bf
tree99251b44ddf45c876adff8106a69b9c9a340a9da
parent00ec2839ce57a493e6686ad6494d605370aa3982
Bug 14233: Add logging support to notices and slips management

This enhancements adds support for logging changes to notices and slips.
Features include:
- a system preference (NoticesLog) which allows you to enable logging changes for notices and slips
- logging new notices, changes to notices, and deletion of notices
- filtering in the log viewer so you can show all changes for a specific notice
- a comparison feature, so you can see what changes were made to a notice.

Test plan:
1/ Add some 'Notice' action logs by adding a new notice or updateing an
existing notice
2/ Go to the 'Log viewer' under 'Tools'
3/ Note you can filter by 'Notices'
4/ Confirm the changes you made appear in the logs and that the 'Object'
field links back to the updated notice ready for editing.

1/ Make some changes to at least two different notices to trigger logs
2/ Go to the 'Log viewer' from 'Tools' and filter on 'Notices'
3/ Note, you can now see the 'Compare' checkbox option for these logs
4/ Select the checkbox on one of the notices and note that the results
are now filtered by that specific notice.
5/ Select a second checkbox to expose the option to 'View comparison'
6/ Click 'View comparison' to see the 'Diff view' of the two notices.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
tools/letter.pl
tools/viewlog.pl