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

Attributes with the same name from different object types and schemas are searched against the database when the attribute is added to the Filter objects with attributes, resulting in long searching time

      Issue Summary

      Attributes with the same name from different object types and schemas are searched against the database when the attribute is added to the Filter objects with attributes, resulting in long searching time

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Generate an Assets IT Service Management projects with sample data.
      2. Generate a schema from scratch. The only requirement for this schema is to have an object type that has an attribute of User type. Name the attribute "Server Owner".
      3. Go to custom fields and configure the context of the field called Affected Server.
      4. In the Filter objects with attributes field, add "Server Owner".
      5. Enable SQL logging.
      6. Create or edit an issue in the project created in the first step. Type something in the Affected Server field. Notice the behavior.

      Expected Results

      Without delay, the Affected Server field returns a list of objects that fulfill the input

      Actual Results

      In an instance with many objects (an example is 20k results should return from the AQL in the custom field), the Affected Server field took a noticeable delay (up to 20 seconds in a reported case) in suggesting objects to be selected.

      With SQL enabled, we see that there's a query looking for the value of the object type attribute in the other schema which has nothing to do with the current custom field. This object type attribute has the same name as the one to be filtered in the custom field configuration, namely Server Owner.

      "SELECT OAV."ID",OAV."TEXT_VALUE" FROM public."AO_8542F1_IFJ_OBJ_ATTR_VAL" OAV JOIN public."AO_8542F1_IFJ_OBJ_ATTR" OA ON OA."ID" = OAV."OBJECT_ATTRIBUTE_ID" WHERE OA."OBJECT_TYPE_ATTRIBUTE_ID" IN (?)"  {1=768}
      

      So far this seems to be affecting only attribute type User

      Workaround

      Ensure unique attribute names among object types and schemas. Rename the attribute or remove it from the configuration to be filtered.
      After renaming any attribute name in the schema, a manual update (remove the selected attribute and add it again with the new name) in the custom field configuration is needed.

            [JSDSERVER-15219] Attributes with the same name from different object types and schemas are searched against the database when the attribute is added to the Filter objects with attributes, resulting in long searching time

            Dan C added a comment - - edited

            Hello - this bug is having a serious affect on our very large Assets/Jira instance, and causing frequent performance issues for us.

            Could we get the priority raised up to high please? It's a major flaw that still exists even in Jira Service Management 5.17 and 10.1

             

            Thanks.

            Dan C added a comment - - edited Hello - this bug is having a serious affect on our very large Assets/Jira instance, and causing frequent performance issues for us. Could we get the priority raised up to high please? It's a major flaw that still exists even in Jira Service Management 5.17 and 10.1   Thanks.

              a06a9964b472 Dominic Brodowski
              michin Michelle Chin
              Affected customers:
              3 This affects my team
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: