hi,
there is a transition in my project's workflow that has a comment required screen.
I'm reading the comments list through JIRA rest api.
I want to know is there a way to find out which comment belongs to that transition in rest api results?
Welcome to the Atlassian Community!
The only way to do this is to read the history (which you can do from the REST API) and manually match up the record of a transition with the same time stamp as a comment.
Jira does not record where a comment came from (REST, transition, issue view, post-function, etc), but it does stamp comments with a date and time on them, so you can reliably assume that if a comment has "12:26.0047 on the 40th of Octember" on it, and the history says "status changed from in-progress to done at 12:26.0047 on the 40th of Octember" then the comment was made during the transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @zahra13rashidi and welcome to the Community!
There is no link between a transition and the comments, so I am afraid that will be difficult. Since the comment is required and added during the transition, both the transition event itself and the comment are logged with a timestamp against the same issue. So using the transition timestamp, you could see if you can find a comment logged within the same time range of a couple of seconds. That won't be 100% fail safe, I guess, but a potential workaround maybe.
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
as you said it won't be flawless but I guess this is the only way.
thank you for your help!
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.