We have created an automation to create jira tickets using the api "POST /rest/api/<project id>/issue"
We pass the description as payload and the Jira ticket is opened.
usually it works. But if the ticket description contains image, it fails with the error - "We can't create this issue for you right now, it could be due to unsupported content you've entered into one or more of the issue fields. If this situation persists, contact your administrator as they'll be able to access more specific information in the log file."
The process works as below-
1)Our client opens the JSD ticket.
2)They put media (video or image) into the Description
3)Our automation listens for new tickets in JSD.
4)As soon as there is a new ticket in JSD, the automation reads its description and puts the same as payload to the Jira to create a corresponding jira ticket.
5)The automation works as expected unless we have added media into the description. All help is appreciated.
The failing payload is something like below- (Sensitive info removed)
"description": {
"content": [{
"content": [{
"text": "<Some Text>",
"type": "text"
}],
"type": "paragraph"
}, {
"content": [{
"text": "<Some Text>",
"type": "text"
}],
"type": "paragraph"
}, {
"content": [{
"type": "media",
"attrs": {
"width": 200,
"type": "file",
"id": "<Some Id>",
"collection": "<Some Text>",
"height": 183
}
}],
"type": "mediaSingle",
"attrs": {
"layout": "center"
}
}, {
"content": [{
"text": " ",
"type": "text"
}],
"type": "paragraph"
}, {
"content": [{
"text": "Thanks. ",
"type": "text"
}],
"type": "paragraph"
}, {
"type": "rule"
}, {
"content": [{
"text": "<Some Text>",
"type": "text"
}, {
"text": "<Some Email Id>",
"type": "text",
"marks": [{
"type": "link",
"attrs": {
"href": "<Some weblink>"
}
}]
}, {
"text": ". <Some text>",
"type": "text"
}],
"type": "paragraph"
}],
"version": 1,
"type": "doc"
}
I'm not sure if my answer is going to help you, because you're talking about images within the Description. When I was building an app to create tickets in Jira cloud, I discovered that for attachments, you need to first create the ticket without attachments, and only then add the attachments to the newly-created ticket.
Hi @Warren
Thanks for the comment. I can accept that the image can be added only once the ticket is created.
But how is the same working from Jira UI? I can add the image in the Jira description and it shown no issue.
Any workaround in this direction would be really appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.