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

Issue cannot be created on customer portal when an Assets custom field with global context refer to another custom field not in the context of the project in Filter Issue Scope

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Low Low
    • None
    • 10.3.0, 10.3.3, 10.5.0

      Issue Summary

      Issue cannot be created on customer portal when an Assets custom field with global context refer to another custom field not in the context of the project

      Steps to Reproduce

      • Create one Assets custom field A with global context.
      • Create another custom field B. It does not have to be Assets custom field as long as it can be referred as placeholder in the filter issue scope of custom field A.
      • In custom field A refer to custom field B value in the Filter Issue Scope (Ex. Key = ${customfield_B}.
      • Set a default value for custom field A.
      • Create project A and project B.
      • Associate Custom field B only to project B in the context.
      • Do not add those fields to any screen or request types of the 2 projects.
      • Try to create an issue from the customer portal of project A. Note that an error is thrown out when clicking on create This form contains a hidden field that does not have a valid default value configured and the issue is not created:
      • By checking the HAR file when the issue is trying to be created we observe the error pointing at custom field A. The message state that custom field A cannot find the object. Note again that nor field A or B are added to the request type:
        {
            "errors": [
                {
                    "errorMessage": "This form contains a hidden field that does not have a valid default value configured"
                },
                {
                    "errorMessage": "Could not find Assets object/s (TEST-1)",
                    "field": "customfield_10123"
                }
            ],
            "reasonKey": "validation.error",
            "reasonCode": "400"
        

      Expected Results

      Jira issue should be created anyway since nor field A or B are added to the request type of the project.

      Actual Results

      The Jira issue is not created from the customer portal and the error message above is thrown.

      Workaround

      • By checking the HAR file while issue is created identify the ID of custom field affected.
      • Check the affected custom field configuration Issue Filter Scope and identify the referred custom field B not associated to project A.
      • Either remove the reference to custom field B or go in the configuration of custom field B and change the context to associate it also to project A.

      Versions Tested

      • Testing Requirements Version Affected Version
      • Customers Reported Version 10.3.3 - Yes
      • Most Recent Bug-Fix Release     10.5.0 - Yes
      • Most Recent LTS    
        • 10.3.x Yes
      • Previous Supported LTS     5.12.x - No

          Form Name

            [JSDSERVER-16087] Issue cannot be created on customer portal when an Assets custom field with global context refer to another custom field not in the context of the project in Filter Issue Scope

            Sam Xu added a comment - - edited

            This is not a bug.

            Jira global context means during issue creation, the issue is setting this Custom field value, regardless of whether the field is added to a screen. Jira's source-of-truth is the issue context, and not screen state.

            This is an invalid configuration, you can see this if the custom field A is added to Project A, and while attempting to create an issue with the default value, it will return the same error.

            Whats happening here is that Jira default value field is set, and because its global, its adding the value of the Custom Field to projects in scope, in this case Project A.

            On Project A issue creation, because the default is set, it will attempt to create the issue with that value, which will obviously fail in this case, since the issue filter scope condition is not matching.

            So in short, the major confusion here is that Jira default custom field value will be added to all projects within scope, whether the issue type has a screen configuration to show it.

            Workarounds

            There are some workarounds, the first one being to configure the fields in such a way that is not conducive to error by avoiding using Filter Issue Scope with Custom Field Default Value and global custom field context.

            Another workarounds could be to use Filter Assign Scope instead of Filter Issue Scope + Custom Field Default Value. 

            Sam Xu added a comment - - edited This is not a bug. Jira global context means during issue creation, the issue is setting this Custom field value, regardless of whether the field is added to a screen. Jira's source-of-truth is the issue context, and not screen state. This is an invalid configuration, you can see this if the custom field A is added to Project A, and while attempting to create an issue with the default value, it will return the same error. Whats happening here is that Jira default value field is set, and because its global, its adding the value of the Custom Field to projects in scope, in this case Project A. On Project A issue creation, because the default is set, it will attempt to create the issue with that value, which will obviously fail in this case, since the issue filter scope condition is not matching. So in short, the major confusion here is that Jira default custom field value will be added to all projects within scope, whether the issue type has a screen configuration to show it. Workarounds There are some workarounds, the first one being to configure the fields in such a way that is not conducive to error by avoiding using Filter Issue Scope with Custom Field Default Value and global custom field context. Another workarounds could be to use Filter Assign Scope instead of Filter Issue Scope + Custom Field Default Value. 

              Unassigned Unassigned
              tmarchionni@atlassian.com Tiziana Marchionni
              Affected customers:
              1 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: