Hello
I have two instances in production js.atlassion.net (jira software) for the dev and jsm.atlassian.net (Jira service Management) for the supports.
I have made an app link betwen my two instances. This means that i can link tickets from the two different instances.
What i want to do now, is to be sure that comment made in js tickets copied in jsm tickets.
I saw that the only possible solution for this is to go through automation then rest api. But nothing appens
I share the steps of my config with you
1 - My automation on js
2 - In send web request, i put this
Webhook URL* : https://jsm.atlassian.net/rest/api/3/issue/{{issue.key}}/comment
HTTP Method : POST
Webhook body : Custom data
Custom data :
"body": { "content": [ { "content": [ { "text": "Commentaire ajouté sur le ticket : {{triggerIssue}}", "text": " Dernier commentaire : {{triggerissue.comments.last.body}}", "type": "text" } ], "type": "paragraph" } ], "type": "doc", "version": 1 }
Hi @Davy Evrard YORO ,
Your automation looks correct.
After the web request is sent, be sure to check the 'Delay Further steps', add a log action step and print the Body and status of the web request sent.
This will help you identify if the comment is being added as expected.
So i add {webhookResponse.status}}
But, I don’t see any change in the logs
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.
Add this syntax {{webResponse.status}} and retry the execution.
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.
Can u share a snapshot of your web request action?
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.
I would suggest making 2 changes
Firstly, check the second box as well so that the flow proceeds even without 200 response, this is for testing sake, and can be unchecked once you're confident the automation works fine.
Next I would Try using the Validate option, with one of the issue keys whose comment you're trying to copy. This will give you instant feedback if something is going wrong.
Just to get better clarity for the audit logs would it be possible to share the output in English please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got this error when using the validate option :
{ "errorMessages": [ "There was an error parsing JSON. Check that your request body is valid." ] }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My request body
{
"body": {
"content": [
{
"content": [
{
"text": "Comment added on ticket {{triggerIssue}}: {{triggerissue.comments.last.body}}",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
},
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I solved the last error message by removing the coma here
Now i got an other error message related to permission:
{ "errorMessages": [ "Issue does not exist or you do not have permission to see it." ], "errors": {} }
I thought that the fact of having created the ticket myself gave me the necessary rights. But it seems that to use the api I must have full jira system administrator rights?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the Jira permission helper with the issue that you're trying to add a comment, that should help you find the root cause for the error.
Also, are you creating a new issue in the same automation? If yes, then you'll need to add the refetch issue data Action to get the new ticket details.
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.