Issue 45351: LKSM: Show data changes in regular audit log

issues
Status:resolved
Assigned To:hannahb
Type:Feature Request
Area:Auditing
Priority:2
Milestone:22.07
Opened:2022-04-27 15:44 by hannahb
Changed:2022-06-30 13:51 by Susan Hert
Resolved:2022-06-30 13:51 by Susan Hert
Resolution:Fixed
Support Ticket: 
Pull Requests:inventory#472
sampleManagement#1063
platform#3496
Closed:
2022-04-27 15:44 hannahb
Title»LKSM: Show data changes in regular audit log
Assigned To»Susan Hert
Notify»hannahb;cnathe;Jason Leadley
Type»Feature Request
Area»Auditing
Priority»3
Milestone»22.06
I've gotten two requests in two days to show more details of our audit logs in Sample Manager, namely the: Data changes, New record columns, Old record columns fields.

Can we update the default view in LKSM to include these for all relevant tables?

I'm thinking to start with:

Freezer Management Events
Sample Timeline Events
Sources Events (although I can't find the LKS log for this, so maybe this isn't an option)
Data Update Events (is this Query update events?)

Not a super high priority but if it's small would be great to have as the default

2022-05-09 12:11 Susan Hert
Assigned ToSusan Hert»triage
Notifyhannahb;cnathe;Jason Leadley»hannahb;cnathe;Jason Leadley;Susan Hert
We'll need different changes for the different audit event types:
   - Freezer Management Events - To add to the default view, we would likely update InventoyAuditProvider
   - Sample Timeline Events - Would adjust the SampleTimelineAuditProvider
   - Sources Events - This is a custom query (SourcesAuditEvent) over the queryUpdateAuditEvent table, so the query will need to be adjusted
   - Data Update Evens - Yes, this is QueryUpdateEvents.

We could use specialized views for the application audit views, or adjust queries to request these columns specifically, but perhaps we can leave these off of the default views if we support customization of the default views for the audit grids with our upcoming story for saving grid views? Adding them in makes the grids considerably more ugly and affects usages outside of LKSM as well.

In any case, we'll likely want to add a renderer for the New record columns and Old record columns since they currently show up like this:
    CheckedOutBy=&Description=&InitialVolume=&Consumed=&CreatedBy=1005&Name=SH-4%20%28B03%29&ModifiedBy=1005&Created=2022-04-20%2009%3A32%3A24.703&InventorySystemId=1&Col=3&RowId=7009&VolumeUnits=&MaterialId=47172&Modified=2022-04-20%2009%3A32%3A24.703&FreezeThawCount=0&BoxId=1&Stored=2022-04-20%2009%3A32%3A24.665&Container=02dd731c-0767-103a-8c98-02a6963667d0&Volume=&Barcode=&Ref=B03&Row=2&CheckedOut=

For the freezer management events and sample timeline events, I'm curious to know what we are not surfacing in the apps that users want to see in these grids (or is this request for purposes of exporting and reporting).

Estimate is for the case of adding a renderer for the old and new record columns. Might be a bit more than 13 to account for tests.

2022-05-11 13:08 hannahb
Assigned Totriage»Susan Hert
Priority3»2
Milestone22.06»22.08
Thanks, Susan. Retargeting for 22.8

2022-06-30 11:10 Susan Hert
TitleLKSM: Show data changes in regular audit log»**LKSM: Show data changes in regular audit log
Pull Requests»https://github.com/LabKey/inventory/pull/472 https://github.com/LabKey/sampleManagement/pull/1063 https://github.com/LabKey/platform/pull/3496

2022-06-30 13:51 Susan Hert
resolve as Fixed
Title**LKSM: Show data changes in regular audit log»LKSM: Show data changes in regular audit log
Statusopen»resolved
Assigned ToSusan Hert»hannahb
Milestone22.08»22.07
Change has been merged to develop for inclusion in 22.7. The only changes made at this time were to add the oldRecordMap and newRecordMap fields to the Source Events table as hidden fields. After discussion with Hannah, I did not do any updates to the display of these map fields, other than to attach the DisplayColumnFactory used in most places to the list audit logs and the Source Events log. If we want to display the data differently in the apps in the future, a conceptURI was introduced that should make it easy to attach a renderer to these columns.