Hi there,
I am pulling comments for a Jira issue via the rest API
rest/api/2/issue/{IssueKey}/comment
In the JSON there is a big slab of text with the who, the issue key, date etc etc.
Is there something I can add to the method to just pull out the actual comment that was entered into Jira. I would like to update a journal in another system with the comment only and not have all the other surrounding data that comes out with it.
Thanks
Hello Steven,
When you access the the comments via an API call, you will have all contents of the comments returned to you. From here you will need to parse out the Comments into multiple variables to be called upon later.
To better help with getting an answer that is applicable to what you’re doing, can we know which language (javascript, python, powershell) you are attempting to use to communicate with the API? This will help us ensure we provide an answer that is most accurate to your needs.
Once we have a response we can work on figuring out a solution with you.
Regards,
Stephen Sifers
Hey,
I am collecting the Jira email by actually catching the email in an email manager in Cherwell. When the Jira comment is updated, the email is sent with the Cherwell Incident number in the subject, I parse the subject to match it to an active Cherwell ticket, then just use an expression in Cherwell to match the saved JIRA issue key also.
The issue is the 'body' of the email is the entire email apart from the subject, so the comment is just another line in a mass of the body.
I was hoping to prefix just the comment line in the email with something and then I can catch and parse that out also as part of the email monitor process in Cherwell.
Hope that helps with where I am stuck.
S.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know the ticket stated I am using the API for the comment pull, but the email is a far more robust solution just based on what I can do with the expression manager in Cherwell.. I just came unstuck when I realised the way that Jira treats the email when it sends it.. all the content in the body.
S.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok I have this working via the API now, except for one thing - I am only able to write the first comment from Jira.
If I can determine via the API what the lastest comment is from Jira, I am set.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All good.. I sorted this out :) reversed the way Cherwell was looping through the API Get results and stored the last lump of data in a variable :)
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.