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

Removing a project from a custom field context breaks the request types where it is used

      Issue Summary

      If a custom field is added to a request type in Jira Service Management (JSM) and later the related project is removed from the custom field context, it will prevent users from creating new issues with that request type in the customer portal and may also prevent users from seeing requests in the customer portal.

      Steps to Reproduce

      1. Create a custom field of any type, then add a JSM project to its context
      2. Access the same JSM project, then go to Project settings (âš™ icon) > Request types
      3. Click on "Edit" for any request type, then add the custom field created in the previous step
      4. Go to Administration (âš™ icon) > Issues > Custom fields, then click on ... > Configure contexts for the custom field
      5. Remove the JSM project from its context, then save the changes
      6. Access the JSM project's customer portal, then try to create an issue with the related request type

      Expected Results

      The request is created successfully.

      Actual Results

      The request fails to be created. In the atlassian-jira.log file, the following error can be seen:

      2025-05-23 16:07:39,645-0300 http-nio-8080-exec-24 url: /servicedesk/customer/portal/3/create/15, /rest/servicedesk/1/customer/pages/portal/3/create/15; user: rrosa ERROR rrosa 967x2478x1 y5x4l1 0:0:0:0:0:0:0:1 /servicedesk/customer/portal/3/create/15 [o.a.c.c.C.[.[localhost].[/].[default]] Servlet.service() for servlet [default] threw exception
      java.lang.NullPointerException: Cannot invoke "com.atlassian.jira.issue.fields.config.FieldConfig.getId()" because "fieldConfig" is null
      	at com.atlassian.jira.issue.customfields.impl.LabelsCFType.getDefaultValue(LabelsCFType.java:154)
      	at com.atlassian.servicedesk.internal.fields.defaultvalues.list.LabelCFDefaultValueProvider.getLabelsDefaultValues(LabelCFDefaultValueProvider.java:31)
      	at com.atlassian.servicedesk.internal.fields.defaultvalues.list.LabelCFDefaultValueProvider.lambda$getDefaultValueIfValid$1(LabelCFDefaultValueProvider.java:24)
      

      Workaround

      • Remove the custom field from the affected request type OR
      • Add the project back to the custom field context

            [JSDSERVER-16230] Removing a project from a custom field context breaks the request types where it is used

            SET Analytics Bot made changes -
            Support reference count Original: 2 New: 1
            SET Analytics Bot made changes -
            Support reference count Original: 1 New: 2
            SET Analytics Bot made changes -
            UIS New: 5
            Jira Server Release Automation Bot[ADM-107524] made changes -
            Fix Version/s Original: 10.7.1 [ 112593 ]
            Fix Version/s New: 10.7.2 [ 113126 ]
            Benjamin Suess made changes -
            Fix Version/s Original: 10.8.0 [ 113207 ]
            Benjamin Suess made changes -
            Fix Version/s New: 10.8.0 [ 113207 ]
            Fix Version/s New: 10.7.1 [ 112593 ]
            Fix Version/s New: 10.3.8 [ 112691 ]
            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 ]
            Benjamin Suess made changes -
            Description Original: h3. Issue Summary

            If a custom field is added to a request type in Jira Service Management (JSM) and later the related project is removed from the custom field context, it will prevent users from creating new issues with that request type in the customer portal and may also prevent users from seeing requests in the customer portal.
            h3. Steps to Reproduce
             # Create a custom field of Label type, then add a JSM project to its context
             # Access the same JSM project, then go to {{Project settings (âš™ icon) > Request types}}
             # Click on "Edit" for any request type, then add the custom field created in the previous step
             # Go to {{{}Administration (âš™ icon) > Issues > Custom fields{}}}, then click on {{... > Configure contexts}} for the custom field
             # Remove the JSM project from its context, then save the changes
             # Access the JSM project's customer portal, then try to create an issue with the related request type

            h3. Expected Results

            The request is created successfully.
            h3. Actual Results

            The request fails to be created. In the atlassian-jira.log file, the following error can be seen:
            {noformat}
            2025-05-23 16:07:39,645-0300 http-nio-8080-exec-24 url: /servicedesk/customer/portal/3/create/15, /rest/servicedesk/1/customer/pages/portal/3/create/15; user: rrosa ERROR rrosa 967x2478x1 y5x4l1 0:0:0:0:0:0:0:1 /servicedesk/customer/portal/3/create/15 [o.a.c.c.C.[.[localhost].[/].[default]] Servlet.service() for servlet [default] threw exception
            java.lang.NullPointerException: Cannot invoke "com.atlassian.jira.issue.fields.config.FieldConfig.getId()" because "fieldConfig" is null
            at com.atlassian.jira.issue.customfields.impl.LabelsCFType.getDefaultValue(LabelsCFType.java:154)
            at com.atlassian.servicedesk.internal.fields.defaultvalues.list.LabelCFDefaultValueProvider.getLabelsDefaultValues(LabelCFDefaultValueProvider.java:31)
            at com.atlassian.servicedesk.internal.fields.defaultvalues.list.LabelCFDefaultValueProvider.lambda$getDefaultValueIfValid$1(LabelCFDefaultValueProvider.java:24)
            {noformat}
            h3. Workaround
             * Remove the custom field from the affected request type *OR*
             * Add the project back to the custom field context
            New: h3. Issue Summary

            If a custom field is added to a request type in Jira Service Management (JSM) and later the related project is removed from the custom field context, it will prevent users from creating new issues with that request type in the customer portal and may also prevent users from seeing requests in the customer portal.
            h3. Steps to Reproduce
             # Create a custom field of any type, then add a JSM project to its context
             # Access the same JSM project, then go to {{Project settings (âš™ icon) > Request types}}
             # Click on "Edit" for any request type, then add the custom field created in the previous step
             # Go to {{{}Administration (âš™ icon) > Issues > Custom fields{}}}, then click on {{... > Configure contexts}} for the custom field
             # Remove the JSM project from its context, then save the changes
             # Access the JSM project's customer portal, then try to create an issue with the related request type

            h3. Expected Results

            The request is created successfully.
            h3. Actual Results

            The request fails to be created. In the atlassian-jira.log file, the following error can be seen:
            {noformat}
            2025-05-23 16:07:39,645-0300 http-nio-8080-exec-24 url: /servicedesk/customer/portal/3/create/15, /rest/servicedesk/1/customer/pages/portal/3/create/15; user: rrosa ERROR rrosa 967x2478x1 y5x4l1 0:0:0:0:0:0:0:1 /servicedesk/customer/portal/3/create/15 [o.a.c.c.C.[.[localhost].[/].[default]] Servlet.service() for servlet [default] threw exception
            java.lang.NullPointerException: Cannot invoke "com.atlassian.jira.issue.fields.config.FieldConfig.getId()" because "fieldConfig" is null
            at com.atlassian.jira.issue.customfields.impl.LabelsCFType.getDefaultValue(LabelsCFType.java:154)
            at com.atlassian.servicedesk.internal.fields.defaultvalues.list.LabelCFDefaultValueProvider.getLabelsDefaultValues(LabelCFDefaultValueProvider.java:31)
            at com.atlassian.servicedesk.internal.fields.defaultvalues.list.LabelCFDefaultValueProvider.lambda$getDefaultValueIfValid$1(LabelCFDefaultValueProvider.java:24)
            {noformat}
            h3. Workaround
             * Remove the custom field from the affected request type *OR*
             * Add the project back to the custom field context

              c8bcca445054 Benjamin Suess
              rrosa@atlassian.com Rodrigo Rosa
              Affected customers:
              1 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated: