Comment 11 for bug 1805895

Revision history for this message
Dan Briem (dbriem) wrote :

(3.2.6) This looks like a saved column validation issue for eg-grids with the auto-fields attribute. Bucket grids load columns from an IDL class in addition to a default column config. But, at the point when saved columns are checked that they match a column on the grid, only the default columns have loaded, so any saved IDL columns are ignored as invalid.

For example, on User Buckets, "User ID" is a default column, so when it's saved it sticks. But, if "Is Deleted" is saved, it doesn't stick because the columns from the ILS User IDL class don't load until after the promise resolves that handles the saved columns.

This patch to grid.js adds a call to $scope.handleAutoFields() in the egCore.hatch.getItem callback. This still gives time for the transcluded eg-grid-fields to load (no collisions) and loads the columns from the IDL class before the saved config is whitelisted. The original call in the eg-grid link function stays to handle the case where there's no persist-key or saved config. Note: it does call twice if there's a saved config, but it only runs if $scope.autoFields is set and it deletes that property after it runs the first time.

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbriem/lp1805895_bucket_grids_dont_save