Fleshing org unit on standing penalties should omit org unit children
Bug #1959461 reported by
Jeff Godin
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned | ||
3.7 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Affects at least Evergreen 3.8 -- or may be most noticeable there.
When loading a user, the AngularJS patron service performs "local" fleshing of the patron object, including fleshing the org unit on standing penalties.
When a standing penalty's org unit has child org units, this can result in a large number of org units being attached to the patron object, which are then sent to the server if you edit the patron.
This can be particularly problematic when adding a patron message with Depth set to "Everywhere".
Your patron object ends up with a full copy of the org tree for each such message.
Changed in evergreen: | |
assignee: | nobody → Jeff Godin (jgodin) |
Changed in evergreen: | |
status: | New → Confirmed |
tags: | added: performance |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I think the fleshing of org unit on standing penalties is so that we have at least the org unit name/shortcode when displaying the penalties later in the client.
It seems unlikely that we need the children of the org unit, if any.
In addition to not fleshing a large number of aou objects on each standing penalty, we might not even need to send the standing_penalties field contents to the server when saving the patron.
For now, an approach to clone and set children of the fleshed org unit to an empty array seems to help address the issue.
see working branch user/jeff/ lp1959461_ avoid_fleshing_ org_unit_ children
https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ jeff/lp1959461_ avoid_fleshing_ org_unit_ children