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

Assets CF fails to load values for default value if there are more than one project in the field context

      Issue Summary

      If you have more than 1 project in an Assets custom field context, the field values are not fetched while trying to set a default value.

      This is because the REST API that should fetch the field values prepares an invalid url endpoint and thus doesn't return any expected values.

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      1. Create Sample data by - Projects >> Create project >> Create sample data >> Assets IT Service Management
      2. Go to any of the "Affected Business Service" Assets object custom field and click on Configure Contexts
      3. Add more than 1 project in the CF context in the Applicable contexts for scheme by Edit Configuration >> select the radio button Selected projects >> Drag and drop more than 1 project to the Selected projects section >> Save
      4. Now try to Edit default value

      Expected Results

      • Admin should be able to set the default value on a CF with more than 1 project in the CF context

      Actual Results

      • If there was no default value set earlier (before adding the >1 project context), the admin would not be able to add a default value:

      This seems to be due to the fact that Assets somehow generates an incorrect REST endpoint /rest/insight/1.0/customfield/default/0/objects and that's why it fails.

      Workaround

      1. Remove all Project context from the Custom Field Configuration - i.e., change it to All projects in Jira (global context):
      2. Then chose the Default value(s) for the custom field
      3. Add the Project Context back again
      4. Now, the Custom field should populate the default value along with the other possibilities:

        1. 2024-07-05_15-50-53.png
          2024-07-05_15-50-53.png
          103 kB
        2. 2024-07-05_15-51-23.png
          2024-07-05_15-51-23.png
          43 kB
        3. 2024-07-05_15-53-59.png
          2024-07-05_15-53-59.png
          98 kB
        4. 2024-07-08_15-42-49.png
          2024-07-08_15-42-49.png
          150 kB
        5. 2024-07-08_15-54-48.png
          2024-07-08_15-54-48.png
          36 kB

          Form Name

            [JSDSERVER-15428] Assets CF fails to load values for default value if there are more than one project in the field context

            Marko Filipan made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 968474 ]
            Suddha made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 968468 ]
            Marc Dacanay made changes -
            Labels Original: lts10nth ltsr New: lts10nth
            Marc Dacanay made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 938522 ]
            Satej Mirpagar made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            Marc Dacanay made changes -
            Labels Original: lts10nth New: lts10nth ltsr
            Sam Xu made changes -
            Fix Version/s New: 5.17.2 [ 108793 ]
            Fix Version/s New: 5.12.13 [ 108709 ]
            Fix Version/s New: 10.0.0 [ 107096 ]
            Sam Xu made changes -
            Status Original: In Progress [ 3 ] New: Waiting for Release [ 12075 ]
            Bartosz Ornatowski made changes -
            Sprint New: LTS Sprint [ 7234 ]
            Bartosz Ornatowski made changes -
            Labels New: lts10nth

              jxu2@atlassian.com Sam Xu
              smitra2@atlassian.com Suddha
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: