Insight - Filter Assign Scope (strict) can be impacted by custom field(s) outside of the issue context
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
In certain situations, Insight custom field's Filter Assign Scope (Strict) might appear to be not working as expected on certain issue keys. If you find yourself where the Custom field is behaving correctly on some issues and not working for some, this article might be applicable.
Environment
Take a minute to compare the setup described below with your configuration:
- Object Type X has a one-to-one relationship with Object Type Y
- Parent CF 1 and Parent CF 2 both are configured with for Object Type X but they're restricted by issue types they're applicable to viz., Parent CF 1 restricted to Issue Type A and Parent CF 2 restricted to Issue Type B
- These two issue types also have different Field Configuration, Screen schemes (thus making their issue context different from each other)
- Another custom field Child CF is for Object Type Y and this field is applicable to both Issue Type A and Issue Type B
- This Child CF is configured with an IQL which depends on both Parent CF 1, Parent CF 2 with an OR condition:
object HAVING inR(objectType = "Object Type X" AND "Key" = ${customfield_10500}) OR object HAVING inR(objectType = "Object Type X" AND "Key" = ${customfield_10501})
- Make Assign Scope Filter Strict And allow Multiple
Diagnosis
- The symptom could be that you're finding the Child Custom field's value to be incorrect in certain issue keys but not on all
- You might be expecting just one value in the Child CF, but somehow it's showing multiple values even though there shouldn't be
- Even if you update the Child CF field manually, it still remains the same
- Check through REST API and you would not find any field or value for one of the custom fields in the IQL:
http(s)://<BASE-URL>/rest/api/2/issue/PROJ-XXX
- In the issue history, you would see the bad issue key was moved from Issue Type A to Issue Type B or vice versa
Cause
This issue has been recorded as a bug: JSDSERVER-11086 - Getting issue details... STATUS
However, the bug with Insight Custom field is actually caused by either of the following two Jira bugs:
- The issue type was changed by Edit issue action (if they share the same workflow) exploiting bug: JSWSERVER-21241 - Getting issue details... STATUS
- The issue type was changed via REST API exploiting bug: JRASERVER-71292 - Getting issue details... STATUS
Solution
- Bring the custom field gone out of scope/context back to the affected issue type and remove the old value manually
- Use the Move action instead of Edit to change issue types