Issue Summary
Indexing will break in version 3.29.2 and later if the Team custom field was ever renamed.
Steps to Reproduce
- Upgrade or install Advanced roadmaps to 3.29.2
- Rename Team custom field.
- Perform any action that trigger indexing.
- such as: Creating/Editing/Transitioning issue that has value for Team custom field
Expected Results
Action is successful. Issue index is updated
Actual Results
Action proceeds but issue index is not updated.
The below exception is thrown in the atlassian-jira.log file:
2020-12-13 19:21:15,186+0000 https-jsse-nio-8443-exec-166 WARN XXXXX XXXXxXXXXXxX XXXXXXX XXX.XXX.XXX.XX,XX.XX.XXX.XX /secure/WorkflowUIDispatcher.jspa [c.a.jira.index.AccumulatingResultBuilder] java.lang.IllegalStateException: Team custom field ID cannot be found java.lang.RuntimeException: java.lang.IllegalStateException: Team custom field ID cannot be found at com.atlassian.jira.index.DefaultIndex$Failure.<init>(DefaultIndex.java:100) at com.atlassian.jira.issue.index.DefaultIssueIndexer$EntityOperation.perform(DefaultIssueIndexer.java:838) at com.atlassian.jira.issue.index.DefaultIssueIndexer.lambda$null$4(DefaultIssueIndexer.java:513) ... Caused by: java.lang.IllegalStateException: Team custom field ID cannot be found at com.atlassian.rm.teams.customfields.team.TeamCustomFieldTypeHelper.getCustomFieldId(TeamCustomFieldTypeHelper.java:74) at com.atlassian.rm.teams.customfields.team.TeamCustomFieldType.getCustomFieldId(TeamCustomFieldType.java:44)
Workaround
Rename the team field back to its initial name Team.
Renaming issue fields would affect the saved filters that refers them in JQL. Make sure to update the JQL of those saved filters as well. Reference: Indexing breaks after upgrading to Advanced Roadmaps to Jira 3.29.2 when Team field was renamed.