Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-16008

Assets throws IQLValidationException if the placeholder custom field (ex. (${Custom_field_name})) in Filter assign scope *strict* is made empty

      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.

      1. 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)    

            [JSDSERVER-16008] Assets throws IQLValidationException if the placeholder custom field (ex. (${Custom_field_name})) in Filter assign scope *strict* is made empty

            Satej Mirpagar made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            Mingyi Yang made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 990023 ]
            Benjamin Suess made changes -
            Fix Version/s New: 10.5.0 [ 110315 ]
            Benjamin Suess made changes -
            Status Original: In Progress [ 3 ] New: Waiting for Release [ 12075 ]
            Benjamin Suess made changes -
            Status Original: Short Term Backlog [ 12074 ] New: In Progress [ 3 ]
            Benjamin Suess made changes -
            Assignee New: Benjamin Suess [ c8bcca445054 ]
            SET Analytics Bot made changes -
            Support reference count New: 1
            Suddha made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 984058 ]
            Bartosz Ornatowski made changes -
            Labels Original: ril support-required New: ril
            Bartosz Ornatowski made changes -
            Status Original: Needs Triage [ 10030 ] New: Short Term Backlog [ 12074 ]

              c8bcca445054 Benjamin Suess
              smitra2@atlassian.com Suddha
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: