Hi,
I would like to build a JIRA Listener that checks if a certain custum field have been changed during a transition step.
I’ve being trying with Issue Updated but I could not distinguish the IssueEvent from Edit view and Transition.
Any tip?
Hi,
I would like to build a JIRA Listener that checks if a certain custum field have been changed during a transition step.
I’ve being trying with Issue Updated but I could not distinguish the IssueEvent from Edit view and Transition.
Any tip?
Listeners respond to events, not actions and the event type is listed in the event.
You will need to set up your workflow so that it fires events other than “issue updated”, then your code will be able to read the type and exit if it’s not a transition.
A second option would be to look at the details in the event. If the status changes, you know it’s a transition.
Thanks @nic!
Looking further I could see that there is a parameter into the event named eventsource
When the issue is triggered from a workflow the eventsource value is workflow, and when we edit an issue through an action the eventsource has action as value.
I’ve added this below condition into my listener.
if(issueEvent.getParams()['eventsource'].equals('workflow') == false){
return
}
I hope this parameter will keep being used in the next JIRA releases