Connect App - Create issue using REST API with JWT Authorization

I’m trying to create an issue with the JIRA REST API using an Atlassian Connect App made with express (https://bitbucket.org/atlassian/atlassian-connect-express).

My problem is that when I send a POST request to “/rest/api/latest/issue”, it create an issue but doesn’t set the assignee with that request body.

{
    "fields": {
       "project":
       {
          "key": "PT"
       },
       "summary": "Test",
       "description": "Description",
       "issuetype": {
          "name": "Bug"
       },
       "assignee": {
            "name": "alexis.talon"
       }
   }
}

And when a I try to set the reporter, I just recieve an error : “Reporter is required.”

{
    "fields": {
       "project":
       {
          "key": "PT"
       },
       "summary": "Test",
       "description": "Description",
       "issuetype": {
          "name": "Bug"
       },
       "reporter": {
            "name": "alexis.talon"
       }
   }
}

I’ve can successfully create issue with assignee and reporter using oAuth1 authentification but I need to use JWT to access Jira WebHooks.

Hi @Nolat,

In the latest APIs, you can no longer set user-related fields via “name”. You have to set them via “id” instead, which is equivalent to the “accountId” field in https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-user-get

3 Likes