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

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

                Created:
                Updated:
                Resolved: