Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
Description
Many user settings map from propertyentry.entity_id to external_entities.id, where external_entities.id represents a user.
It seems the Studio Import does not preserve users's external_entities.id: the value is likely to be different after the import. This means that user settings in propertyentry that map to the original external_entities.id are orphaned, and the users' settings are reset to defaults.
Affected settings include:
GH.HasUserCompletedRapidBoardChartIntro GH.HasUserCompletedRapidBoardWelcomeMat GH.RapidViewSelected GREENHOPPER_UP_10000 GREENHOPPER_UP_10001 GREENHOPPER_UP_10002 GREENHOPPER_UP_10003 GREENHOPPER_UP_10004 GREENHOPPER_UP_10005 GREENHOPPER_UP_10006 GREENHOPPER_UP_10007 GREENHOPPER_UP_10101 GREENHOPPER_US_10000 GREENHOPPER_US_10001 GREENHOPPER_US_10002 GREENHOPPER_US_10003 GREENHOPPER_US_10004 GREENHOPPER_US_10005 GREENHOPPER_US_10006 GREENHOPPER_US_10007 GREENHOPPER_US_10100 GREENHOPPER_US_10101 GREENHOPPER_US_10200 GREENHOPPER_US_10201 GREENHOPPER_US_10202 GREENHOPPER_US_10203 GREENHOPPER_US_10204 GREENHOPPER_US_10206 GREENHOPPER_US_10207 GREENHOPPER_US_10208 jira.quick.create.fields jira.quick.create.use jira.quick.edit.fields jira.quick.edit.show.welcome.screen jira.quick.edit.use jira.user.timezone jira.user.whats.new.dont.show.version user.avatar.id user.default.share.private user.issues.per.page user.keyboard.shortcuts.disabled user.notifications.mimetype user.notify.own.changes user.show.actions.in.navigator
GREENHOPPER_US_* are greenhopper user settings for projects. GREENHOPPER_UP_* are user-created contexts for classic boards.
The most visible loss is probably the avatar mapping. The avatar files themselves are transferred fine, so the user just needs to select their avatar again.
It might be possible to fix this up in the db, though this hasn't been thoroughly tested. To try, look up the user's original external_entities.id value for the user in the imported file, e.g. in this case it is 11:
<ExternalEntity id="11" name="fred" type="com.atlassian.jira.user.OfbizExternalEntityStore"/>
Then replace settings that map to the old external_entities.id so that they map to the new value:
jira=> update propertyentry set entity_id=(select id from external_entities where name='fred') where entity_name='ExternalEntity' and entity_id='11'; UPDATE 1 jira=> select * from propertyentry where entity_name='ExternalEntity'; id | entity_name | entity_id | property_key | propertytype -------+----------------+-----------+----------------+-------------- 10424 | ExternalEntity | 113 | user.avatar.id | 3 (1 row)
A restart might be required before changed take effect. I'm not sure what will happen if this ends up creating duplicate settings for some users.