https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20956 --- Comment #91 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- (In reply to David Nind from comment #90)
Created attachment 194612 [details] Log viewer results - after patch
Sorry, I'm not seeing the diff as shown in the screenshot on bug 36698.
Screenshot attached showing what I see in the log viewer.
I have applied the patch, run yarn build, restarted everything, and cleared the browser cache. I even shutdown KTD and restarted with the patch applied in case it was a build thing.
Testing notes (using KTD): 1. Go to a staff interface. 2. Search for a patron and change their permissions (note their borrower number) (for example: Henry Acevedo (23529000035676), borrower number 19, add and remove "Access to all librarian functions (superlibrarian)" 3. Go to Tools > Additional tools > Log viewer. 4. Filter the log entries as follows: - Module = Patrons - Object = <borrowernumber> (for example, 19) 5. Click on submit: ==> There are no log entries for permission changes 6. Apply the patch, rebuild everything (yarn build), restart everything (restart_all), and clear your browser cache. 7. Repeat steps 1 to 5: ==> Permission changes are now logged [1] 8. Check that the diff column in the database contains the full details of the changes: [2] select diff from action_logs where object= <borrowernumber> order by action_id desc limit 1; 9. The tests pass: 9.1 prove t/db_dependent/Koha/Patron.t 9.2 prove t/db_dependent/Log.t
[1] Log viewer information:
See the screenshot:
Modify Henry Acevedo (19) {}
Modify Henry Acevedo (19) { "superlibrarian" : 1 }
[2]
select diff from action_logs where object=19; +----------------------------------+ | diff | +----------------------------------+ | {"D":{"superlibrarian":{"A":1}}} | | {"D":{"superlibrarian":{"R":1}}} | +----------------------------------+
Hi David, Regarding the missing diff display: Since your SQL query confirms that the data is correctly recorded in the action_logs table, it is possible that the column is simply hidden in the interface. To check this, you can: 1- Look for the "Columns" drop-down menu in the table's action bar (usually located at the top of the results table). Note that there is a cog icon (⚙️) right before the "Columns" label. 2- Ensure that the "Diff" checkbox is checked. -- You are receiving this mail because: You are watching all bug changes.