Bug 39628 - Display 'diff' in action logs
Summary: Display 'diff' in action logs
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Andrew Fuerste-Henry
QA Contact: Emily Lamancusa (emlam)
URL:
Keywords:
Depends on:
Blocks: 36698 39908
  Show dependency treegraph
 
Reported: 2025-04-14 15:34 UTC by Andrew Fuerste-Henry
Modified: 2025-05-15 13:09 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Adds a "diff" column to the action logs viewer. This column will display the old (O) and new (N) values of the fields that were changed, for modules that store that information.
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 39628: Show diff in log viewer and column settings (2.01 KB, patch)
2025-04-14 15:39 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 39628: Show diff in log viewer and column settings (2.06 KB, patch)
2025-04-14 20:06 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 39628: Show diff in log viewer and column settings (2.13 KB, patch)
2025-05-09 15:20 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2025-04-14 15:34:15 UTC
Bug 36698 wants to display the diff nicely. As a stopgap, how about we just make it possible to display them as-is?
Comment 1 Andrew Fuerste-Henry 2025-04-14 15:39:33 UTC
Created attachment 180922 [details] [review]
Bug 39628: Show diff in log viewer and column settings

To test:
1 - apply patch
2 - search the log viewer for item edits or something else that records a diff value
3 - see that diff in the new column
4 - confirm the diff value is present in exports and prints
5 - confirm you can use column config to hide that diff value
Comment 2 Roman Dolny 2025-04-14 18:23:39 UTC
Yes, it is good start to show data from diff col.

I modified an item and can confirm p. 1-4 test plan, but not p. 5.

There is no "Diff" in cols list for "Columns" button.
There is no "diff" in configure table (/cgi-bin/koha/admin/columns_settings.pl?module=tools&page=logviewer&table=logst) to hide it by default.
Comment 3 Andrew Fuerste-Henry 2025-04-14 19:05:57 UTC
(In reply to Roman Dolny from comment #2)
> Yes, it is good start to show data from diff col.
> 
> I modified an item and can confirm p. 1-4 test plan, but not p. 5.
> 
> There is no "Diff" in cols list for "Columns" button.
> There is no "diff" in configure table
> (/cgi-bin/koha/admin/columns_settings.
> pl?module=tools&page=logviewer&table=logst) to hide it by default.

Did you restart_all after applying the patch? I forgot to specify that in the test plan, but I do see Diff in the table config after restarting services.
Comment 4 Roman Dolny 2025-04-14 20:05:27 UTC
(In reply to Andrew Fuerste-Henry from comment #3)
> ...
> Did you restart_all after applying the patch? I forgot to specify that in
> the test plan, but I do see Diff in the table config after restarting
> services.

I'm pretty sure I did, but now it works... checked twice, with another browser and incognito. Thanks for suggestion.
Comment 5 Roman Dolny 2025-04-14 20:06:03 UTC
Created attachment 180937 [details] [review]
Bug 39628: Show diff in log viewer and column settings

To test:
1 - apply patch
2 - search the log viewer for item edits or something else that records a diff value
3 - see that diff in the new column
4 - confirm the diff value is present in exports and prints
5 - confirm you can use column config to hide that diff value

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 6 Emily Lamancusa (emlam) 2025-05-09 15:20:12 UTC
Created attachment 182190 [details] [review]
Bug 39628: Show diff in log viewer and column settings

To test:
1 - apply patch
2 - search the log viewer for item edits or something else that records a diff value
3 - see that diff in the new column
4 - confirm the diff value is present in exports and prints
5 - confirm you can use column config to hide that diff value

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 7 Emily Lamancusa (emlam) 2025-05-09 15:26:02 UTC
I agree it's worth displaying the raw diff in the meantime. Thanks, Andrew!
Comment 8 Katrin Fischer 2025-05-15 06:42:27 UTC
This is a bit scary looking. Could we agree to hide the column by default in the table configuration settings? (these are also missing, please follow-up!)
Comment 9 Katrin Fischer 2025-05-15 06:45:17 UTC
I need to clarify, the "Diff" was not showing up initially in my column configuration settings above the table. After some restarting etc. it does now. 
It still might be nice to hide it by default, but leaving that for a simple follow-up.
Comment 10 Katrin Fischer 2025-05-15 07:21:44 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 11 Andrew Fuerste-Henry 2025-05-15 12:31:16 UTC
> It still might be nice to hide it by default, but leaving that for a simple
> follow-up.

Follow-up filed: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39908