Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create JSM issue via Azure Logic App

Marc Scholte July 29, 2024

Hey all,

I am trying to create an integration between my Azure infra and Jira Service Management, using an Azure Logic App with the HTTP action.

 

I am simply sending the following to /rest/api/2/issue:

headers:

{
  "Content-Type": "application/json",
  "Authorization": ""
}

body:

{
  "fields": {
    "project": {
      "id": "10402"
    },
    "summary": "somesummary",
    "description": "somedescription",
    "issuetype": {
      "id": "10909"
    }
  }
}

 However I get a HTTP 400, with the following error:

{
  "errorMessages": [],
  "errors": {
    "summary": "Field 'summary' cannot be set. It is not on the appropriate screen, or unknown.",
    "description": "Field 'description' cannot be set. It is not on the appropriate screen, or unknown."
  }
}

I've checked http-access.log

127.0.0.1 i490x285057x1 - [29/Jul/2024:08:10:17 +0000] "POST https://domain.com/jsd/rest/api/2/issue HTTP/1.0" - - - - "azure-logic-apps/1.0 (workflow db870d40848746eaac6765ed300f4ee8; version 08584796189150721348)" -
127.0.0.1 o490x285057x1 - [29/Jul/2024:08:10:17 +0000] "POST https://domain.com/jsd/rest/api/2/issue HTTP/1.0" 400 223 0.0040 - "azure-logic-apps/1.0 (workflow db870d40848746eaac6765ed300f4ee8; version 08584796189150721348)" -

and atlassian-jira.log

2024-07-29 08:12:23,429+0000 http-nio-8080-exec-20 url: /jsd/rest/api/2/issue DEBUG anonymous 492x285348x1 - sourceip,127.0.0.1 /rest/api/2/issue [c.a.j.rest.exception.ExceptionInterceptor] Setting response mediaType to: application/json
2024-07-29 08:12:23,429+0000 http-nio-8080-exec-20 url: /jsd/rest/api/2/issue TRACE anonymous 492x285348x1 - sourceip,127.0.0.1 /rest/api/2/issue [c.a.j.r.v.issue.scope.RequestScope] Calling destruction callbacks...

I've double checked the screen, permissions, user settings, field settings etc. and I am at a loss.

Hope anyone can help me out.

2 answers

1 accepted

0 votes
Answer accepted
Marc Scholte July 30, 2024

So I sent along my authorization header wrong, I made a typo.

Quito odd JSM complains about the summary and description fields and not just a 'unauthorized' error.

0 votes
Adolfo Casari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2024

@Marc Scholteyou should check the screen scheme for project 10402 and the create screen for issuetype 10909.

Marc Scholte July 30, 2024

Thanks Adolfo, 

I've solved it, issue was in the headers I send along to my JSM endpoint.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
5.1.0
TAGS
AUG Leaders

Atlassian Community Events