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

Assets object cannot be added to an Assets custom field with error "Could not find Assets object/s"

      Issue Summary

      Assets object cannot be added to an Assets custom field with error "Could not find Assets object/s". This seems to be affecting only when the Filter Issue Scope and/or Filter Assign Scope has AQL involving placeholder currentReporter().
      This is reproducible on Data Center: yes

      Steps to Reproduce

      This issue is not reproducible in 5.12.x.

      1. In 5.13.x or 5.14.0, create a Business project with sample data from Assets ITSM template. This creates a set of objects and users which makes the following reproducing steps easier.
      2. Create an Assets object custom field and add it to the all the screens of the new project.
      3. Configure the custom field to get objects from the new schema and below
        Filter Scope (AQL): objectType = Employees
        Filter Issue Scope (AQL): "JIRA User" = currentReporter()
        Filter Assign Scope (AQL): "JIRA User" = currentReporter()
        
      1. Ensure the Make Filter Assign Strict option is not selected.
      2. Create a new issue in the same project by filling in the Summary field and setting the Reporter to Fred Astair, leave all other fields as they are.
      3. The new Assets custom field (created in step 2) is not populated automatically. Edit the issue and click on this custom field to add the suggested object.

      Expected Results

      • When the issue is created, the Assets custom field should have the expected object automatically added.
      • When editing the custom field, the suggested object should be added successfully without error.

      Actual Results

      • Despite fulfilling the requirement on the Filter Assign Scope AQL, the object is not assigned automatically.
      • When attempting to add the object manually, the right object is found but it can't be added with error "Could not find Assets object/s (<object key>)" on the screen
      • As long as the AQL involving currentReporter() is in Filter Issue Scope and/or Filter Assign Scope, it's not possible to assign the object despite being suggested
      • The exception below involving the affected Assets custom field might be found in the atlassian-jira.log.
        2024-02-26 12:41:54,022+0200 http-nio-8080-exec-1 WARN admin 761x162732x1 1syme2s 10.10.10.22 /rest/insight_servicedesk/1.0/servicedesk/customfield/default/341/objects [c.r.j.p.i.services.cache.ObjectIdParser] Failed to parse object id from object key ${CUSTOMFIELD_12345.KEY}
        java.lang.NumberFormatException: For input string: "${CUSTOMFIELD_12345.KEY}"
        ...
        

      Workaround

      • If applicable, select the Make Filter Assign Strict option so that the automatic assignment of objects always happens (issue creation, edit).
      • With this bug, editing the field to add the object is impossible. For affected issues, trigger a field update on the issue like editing the summary, description or label change will make the object assignment happen, provided that the Make Filter Assign Strict option is selected.
      • Note: Removing the AQL from the Filter Issue Scope and/or Filter Assign Scope will allow the expected object(s) to be added manually but this means automatic assignment of objects will not happen. To ensure automatic assignment during issue creation, we can make use of the Assets post function, Assign Objects from an AQL query based on data from an issue. to auto assign the object to the Assets custom field. Add the AQL and specify the Assets custom field accordingly.

        Ensure that this post function is after the Issue Created event.

      Workaround2 :

      Please disable the Feature flag : assets.aql.scope.filtering.on.issue.update in your environment. For details of how to update feature flag refer this page.

      Note- With this feature flag added, the "Filter Issue scope" configuration on the asset custom field is not respected and you can type and select the Asset Objects from different Object Schema.

      Workaround 3 : 

      Explicitly mention the Object ID in a new text field on the screen where the custom field is present. 

        1. image-2024-02-26-12-20-47-672.png
          image-2024-02-26-12-20-47-672.png
          185 kB
        2. image-2024-02-26-12-29-27-960.png
          image-2024-02-26-12-29-27-960.png
          219 kB
        3. screenshot-1.png
          screenshot-1.png
          101 kB
        4. screenshot-2.png
          screenshot-2.png
          159 kB

            [JSDSERVER-15141] Assets object cannot be added to an Assets custom field with error "Could not find Assets object/s"

            ac2ec4681a01

            +1

            Only with the enabled feature flag, we are able to continue using Asset Object custom fields with placeholders!

            Brüse, Bernhard added a comment - ac2ec4681a01 +1 Only with the enabled feature flag, we are able to continue using Asset Object custom fields with placeholders!

            Jakub Talarczyk added a comment - - edited

            hi 3af59e58d8d3 thx for the tip, you are my hero of the day!

            And dear Atlassian, the problem is still not fixed in the version 5.16.1 / 5.17.0 - we just tested it on our test instance. Only the dark feature workaround worked.

            Could you please reopen the ticket?

            Regards

            Jakub

            Jakub Talarczyk added a comment - - edited hi 3af59e58d8d3 thx for the tip, you are my hero of the day! And dear Atlassian, the problem is still not fixed in the version 5.16.1 / 5.17.0 - we just tested it on our test instance. Only the dark feature workaround worked. Could you please reopen the ticket? Regards Jakub

            Adding assets.aql.scope.filtering.on.issue.update.disabled to Dark Features fixed this issue.

            Dark features:
            <BASE_URL>/secure/admin/SiteDarkFeatures!default.jspa

            Joni Smolander added a comment - Adding assets.aql.scope.filtering.on.issue.update.disabled to Dark Features fixed this issue. Dark features: <BASE_URL>/secure/admin/SiteDarkFeatures!default.jspa

            Mathias HD added a comment -

            Can't edit our issues anymore where the Asset Object field is present. There is not suitable workaround here!

            Mathias HD added a comment - Can't edit our issues anymore where the Asset Object field is present. There is not suitable workaround here!

            We can confirm this, it looks like any AQL including a placeholder (in our case the value of a custom field) are affected.

            We are currently evaluating the update to JSM 5.15.1. It seems like this version is also affected. Old projects stop working + new projects can't be configured correctly when an Asset field configuration contains a "Filter Issue Scope" with placeholders.

            Please investigate and fix this immediately!

            Brüse, Bernhard added a comment - We can confirm this, it looks like any AQL including a placeholder (in our case the value of a custom field) are affected. We are currently evaluating the update to JSM 5.15.1. It seems like this version is also affected. Old projects stop working + new projects can't be configured correctly when an Asset field configuration contains a "Filter Issue Scope" with placeholders. Please investigate and fix this immediately!

            We have the same problem and we solved by adding the Custom Field that is used in the Filter AQL in the screen transition.

            Andrea Ortiz Gonzalez added a comment - We have the same problem and we solved by adding the Custom Field that is used in the Filter AQL in the screen transition.

            We have exactly the same problem in our system when using JQL Filter "object HAVING outboundReferences(object HAVING inboundReferences("JIRA User"= currentReporter()))"

            Please raise the priority as this is a bug that prevents us from proper classification of customer tickets in our system.

            Deleted Account (Inactive) added a comment - We have exactly the same problem in our system when using JQL Filter "object HAVING outboundReferences(object HAVING inboundReferences("JIRA User"= currentReporter()))" Please raise the priority as this is a bug that prevents us from proper classification of customer tickets in our system.

            We can confirm this, it looks like any AQL including a placeholder (in our case the value of a custom field) are affected.

            Also we'd like to ask to raise the priority of this issue, since this is really blocking if someone is using Assets and Assets custom fields very heavily.

            Hauke Bruno Wollentin added a comment - We can confirm this, it looks like any AQL including a placeholder (in our case the value of a custom field) are affected. Also we'd like to ask to raise the priority of this issue, since this is really blocking if someone is using Assets and Assets custom fields very heavily.

              bfa5bb10b6a8 Arslan Qamar (Inactive)
              michin Michelle Chin
              Affected customers:
              13 This affects my team
              Watchers:
              26 Start watching this issue

                Created:
                Updated:
                Resolved: