-
Bug
-
Resolution: Fixed
-
Low
-
5.12.12
-
1
-
Severity 2 - Major
-
Issue Summary
If we have two Assets custom fields which depend on each other where customfieldA is selected by User and customfieldB should populate the field values based on the "Filter assign scope" and the "Make Filter Assign Strict" is checked, on an edit issue action if the customfieldA value is removed then the Strict Filter assign scope does not remove the customfieldB value(s) and we see an IQLValidationException in the logs.
Steps to Reproduce
Use the default data set or create an object Schema where objecttypeA can be selected by users and objecttypeB should be populated automatically.
- Configure two custom fields
- Affected Server (customfield_10304) as the parent CF which the users will select
- Affected Server Components (customfield_10305) as the child CF which is supposed to fill the values automatically based on the object chosen in Affected Server (customfield_10304). Populate the Filter assign scope and make sure to check the Make Filter Assign Strict option. (optionally: also check the Multiple option just to make this clear):
- Now create an issue and choose a value in parent custom field Affected Server (customfield_10304)
- This should trigger the Filter assign scope AQL and populate Affected Server Components (customfield_10305) with all objects that matches the Filter assign scope AQL
- Now clear the value in the parent custom field Affected Server (customfield_10304)
Expected Results
Since the Make Filter Assign Strict option is checked, upon the issue edit action of empty'ing the parent customfield,* it should also remove the values in the child custom field*.
Actual Results
- The child custom field is not cleared
- The below exception is thrown in the atlassian-jira.log file:
2025-01-29 16:38:18,565+0000 http-nio-8080-exec-2 url: /jsm/secure/AjaxIssueAction.jspa; user: admin WARN admin 998x761x2 11kr54u 10.228.166.49,172.50.0.2 /secure/AjaxIssueAction.jspa [c.r.j.p.i.s.j.listeners.job.CustomFieldEventListenerJob] Fail to setUserObjectsOnCustomField for issue: 10111 and customfield: customfield_10305 com.riadalabs.jira.plugins.insight.common.exception.IQLValidationException: IQLValidationException: AQL "Server IN (${Affected Server${0}})" has invalid syntax at position 22 with error message "extraneous input 'S' expecting {',', ' '}" at com.riadalabs.jira.plugins.insight.services.core.iql.IQLParserBase.parse(IQLParserBase.java:48) at com.riadalabs.jira.plugins.insight.services.jira.listeners.job.CustomFieldEventListenerJob.setAssignObjectsOnCustomField(CustomFieldEventListenerJob.java:150) at com.riadalabs.jira.plugins.insight.services.jira.listeners.job.CustomFieldEventListenerJob.doUpdate(CustomFieldEventListenerJob.java:130) at com.riadalabs.jira.plugins.insight.services.jira.listeners.CustomFieldEventListener.onIssueEvent(CustomFieldEventListener.java:91) ....
Workaround
Instead of using the custom field name in the Filter Assign Scope (AQL) AQL like:
Server IN (${Affected Server${0}})
Use the customfield ID in the customfield_XXXX format:
Server IN (${customfield_10304${0}})
Versions Tested
Please confirm all versions that have been tested for this issue, and indicate whether the tested version is affected or not affected, below:
Testing Requirements | Version | Affected Version |
---|---|---|
Customers Reported Version | 5.12.12 | Yes |
Most Recent Bug-Fix Release | ||
Previous Major Release | ||
Most Recent LTS | ||
Previous Supported LTS | ||
Other Versions.. | ||
(Add rows as needed) |
- links to