Forums

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

Webhook seperate comments

Patrik Ytterström
Contributor
October 16, 2018

We are using a webhook that sends comments, author and created with "{{#issue.comments}}{{index}}. {{body}}{{^last}},{{/}}{{/}}" but when I receive the webhook I cant find a good way to parse the data because I will receive the data in a string and i'm using python split() to seperate it. The problem is that if someone has that character in the comment it will split in the wrong place. So I wonder if its possible to send the data in a better way. This is how my custom data webhook looks now:

{
"project-key":"{{issue.project.key}}",
"issue-key":"{{issue.key}}",
"issuetype":"{{issue.issuetype.name}}",
"summary":"{{issue.summary}}",
"reporter":"{{reporter.displayName}}",
"description":"{{issue.description}}",
"comments-data":{
"comments":"{{#issue.comments}}{{index}}. {{body}}{{^last}},{{/}}{{/}}",
"author":"{{#issue.comments}}{{author}}{{^last}},{{/}}{{/}}",
"created":"{{#issue.comments}}{{created}}{{^last}},{{/}}{{/}}"
}
}

1 answer

0 votes
Patrik Ytterström
Contributor
October 16, 2018

I will try to use a workaround and use : "comments":"{{#issue.comment}}{{body.concat( "#$%" )}}{{/}}" and split from those characters. But if someone has a better idea I would like to hear it.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events