Avoid storing full transaction data with each work log entry. Only
store data need for work log display and actions.
Includes the addition of a new field (entry.hold_id) for hold requests
so that the value does not have live in the large data blob.
To test:
1. Peform checkouts, holds placements, and other log-tracked actions
in the client.
2. Open Administration -> Workstation -> Stored Preferences and see
values for key "eg.patron_log". Values added after the patch will only
contain ~8 keys with string values, no large nested objects.
3. Open Administration -> Local Administration -> Work Log and confirm
recent log-tracked actions are all represented in the grid.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
function fetch_hold(deferred,entry) {
return egCore.pcrud.search('ahr',
- { 'id' : entry.data.hold_id }, {
+ { 'id' : entry.hold_id }, {
'flesh' : 2,
'flesh_fields' : {
'ahr' : ['usr','current_copy'],
function fetch_patron(deferred,entry) {
return egCore.pcrud.search('au',
- { 'id' : entry.data.patron_id }, {}
+ { 'id' : entry.patron_id }, {}
).then(
function(usr) {
entry.user = usr.family_name();
var entry = {
'when' : new Date(),
'msg' : message,
- 'data' : data,
'action' : data.action,
'actor' : egCore.auth.user().usrname()
};
|| data.action == 'registered_patron'
|| data.action == 'paid_bill') {
entry['patron_id'] = data.patron_id;
+ entry['hold_id'] = data.hold_id;
}
if (data.action == 'paid_bill') {
entry['amount'] = data.total_amount;