Webstaff work log stores unnecessary data

Bug #1641708 reported by Bill Erickson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned

Bug Description

Evergreen 2.11 -- affects all versions

The browser client work log service stores concise user, item, hold, action, timing data to track log entries. In addition, the full fleshed transaction response blob is stored. This extra blob serves no purpose and takes up a lot of space in localStorage and/or Hatch.

Patch to avoid storing the extra data en route.

Revision history for this message
Bill Erickson (berick) wrote :
Revision history for this message
Bill Erickson (berick) wrote :

To test:

1. Perorm checkouts and other log-tracked actions in the client.

2. Open Administration -> Workstation -> Stored Preferences and see values for key "eg.patron_log".

3. Values added after the patch will only contain ~8 keys with string values, no large nested objects.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.next
milestone: 2.next → 2.11.1
assignee: Bill Erickson (berick) → nobody
Changed in evergreen:
milestone: 2.11.1 → 2.next
Galen Charlton (gmc)
tags: added: needsrepatch
removed: pullrequest
Revision history for this message
Galen Charlton (gmc) wrote :

Well, /eg/staff/admin/workstation/log currently references the 'data' key in work and patron log entries to do things like get the patron or copy ID in order to allow the user to open the related record, so the current patch breaks functionality. I've removed the pullrequest tag for now.

That said, I agree with the ultimate aim of the patch. Various related record IDs for each action type are already split out into separate keys in the work log entries; they just need to be used by admin/workstation/log.

Revision history for this message
Bill Erickson (berick) wrote :

Good catch, Galen. Thanks for reviewing.

I have force-pushed a squashed commit back to the same branch that avoids the use of 'entry.data' in the work log UI. In one case (patron_id) it was simply a case of removing ".data." from the path. For "hold_id", I also added the value to the entry at the source (egWorkLog), because it only existing in .data.

I confirmed that patron and holds now display as expected in the work log.

Slapping the pullrequest back on.

tags: added: pullrequest
removed: needsrepatch
Changed in evergreen:
milestone: 2.next → 2.12-beta
no longer affects: evergreen/2.10
no longer affects: evergreen/2.11
Revision history for this message
Bill Erickson (berick) wrote :

Also, since this change is not compatible with existing work log data, I'm removing the back-port targets.

Changed in evergreen:
milestone: 2.12-beta → 2.12-rc
Galen Charlton (gmc)
Changed in evergreen:
milestone: 2.12-rc → 2.12.1
Revision history for this message
Galen Charlton (gmc) wrote :

I've pushed a signoff + a follow-up that records the hold ID only for requested_hold actions to user/gmcharlt/lp1641708_signoff.

tags: added: signedoff
Revision history for this message
Kathy Lussier (klussier) wrote :

Thank you Bill and Galen! Merged to master and release 2.12.

Changed in evergreen:
status: New → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
no longer affects: evergreen/3.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.