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

Jira Service Desk REST api call fails when all fields are hidden

XMLWordPrintable

      Issue Summary

      Creating an issue via the REST API endpoint "/rest/servicedeskapi/request" is not possible if all fields are hidden.

      Steps to Reproduce
      • Modify a Request Type to hide all fields
      • Attempt to create an issue using the same Request Type via the REST API endpoint "/rest/servicedeskapi/request"
      Observation
      • Creating an issue via the Service Desk Portal is successful even if all fields are hidden for a Request Type.
      • Creating an issue via the REST API endpoint "/rest/servicedeskapi/request" fails for the same Request Type.

      Example REST API call:

      {
       "serviceDeskId": "1",
       "requestTypeId": "1",
       "requestParticipants": [
       "admin"
       ]
      }
      

       

      Expected Behavior
      • I would expect an Issue to be created both when using the Service Desk Customer Portal and the REST API endpoint "/rest/servicedeskapi/request.
      Actual Behavior
      • Issue creation fails when using the REST API endpoint "/rest/servicedeskapi/request".
      • A NULL Pointer Exception is encountered:
        <status>
            <status-code>500</status-code>
            <stack-trace>java.lang.NullPointerException
        	at com.atlassian.servicedesk.plugins.rest.internal.resource.assembler.CustomerRequestAssemblerImpl.createCustomerRequest(CustomerRequestAssemblerImpl.java:143)
        	at com.atlassian.servicedesk.plugins.rest.internal.resource.assembler.CustomerRequestAssemblerImpl.lambda$createCustomerRequest$3(CustomerRequestAssemblerImpl.java:72)
        	at com.atlassian.pocketknife.step.EitherStep4.lambda$null$0(EitherStep4.java:29)
        	at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:886)
        
      Workaround
      • Show (unhide) at least one field for the Request Type that cannot be created via the REST API endpoint "/rest/servicedeskapi/request". As long as that Request Type has at least one field shown, the issue creation will succeed.

              Unassigned Unassigned
              mperez2@atlassian.com Michael Perez
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: