Bug 15296

Summary: MEMBER logging in action_logs does not give enough detail.
Product: Koha Reporter: Barton Chittenden <barton>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson, caroline.cyr-la-rose, gmcharlt, kyle.m.hall, kyle, pe.havel, sally.healey
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Barton Chittenden 2015-12-03 15:17:43 UTC
One of our libraries was trying to track down an issue where a patron was charged an enrollment fee -- looking at the patron's category code, it was clear that the patron was not currently in a category that should have been charged. I wanted to see if the patron's category code had changed.

Here's what I found in action_logs:

  select * from action_logs where object='5056' and module='MEMBERS';
+-----------+---------------------+------+---------+--------+--------+--------------------------------+
| action_id | timestamp           | user | module  | action | object | info                           |
+-----------+---------------------+------+---------+--------+--------+--------------------------------+
|   1109625 | 2015-12-02 15:36:32 | 3805 | MEMBERS | CREATE |   5056 |                                |
|   1109636 | 2015-12-02 15:58:28 | 3804 | MEMBERS | MODIFY |   5056 | UPDATE (executed w/ arg: 5056) |
|   1109637 | 2015-12-02 16:02:50 | 3804 | MEMBERS | MODIFY |   5056 | UPDATE (executed w/ arg: 5056) |
+-----------+---------------------+------+---------+--------+--------+--------------------------------+

The 'info' field simply tells me that patron 5056 was modified -- which doesn't give me any information that I couldn't glean from the 'object' and 'action' fields -- I really needed to know which fields in the borrower record were changed.
Comment 1 Barton Chittenden 2016-06-17 15:34:20 UTC
(In reply to Barton Chittenden from comment #0)

> 'action' fields -- I really needed to know which fields in the borrower
> record were changed.

... as well as what the field changed from and to. I *don't* want to see the entire borrower record though.
Comment 2 Kyle M Hall 2016-06-23 16:49:05 UTC
For the CREATE we should list the key/value pairs that are actually set in 'info'. For UPDATE we should list the kye/value pairs that have *changed* in "info".

This may be useful: http://www.perlmonks.org/?node_id=752303
Comment 3 Caroline Cyr La Rose 2018-05-25 15:50:04 UTC
I agree that the info column doesn't give useful information.

There is already a kind of diff in the cataloguing action_logs, which I find  somewhat useful because it gives you the "biblio before" so you can compare and see what changed. It would be even better if there was the before / after but something similar would be a good first step for the patron file.
Comment 4 Joy Nelson 2019-02-14 14:44:43 UTC

*** This bug has been marked as a duplicate of bug 3820 ***