I have a scenario where during Workflow transition, I would make JIRA send a HTTP POST to different application which responds with JSON message. If the application returns Success message the workflow would move to next transition(e.g TODO--> IN PROGRESS). If the external application returns an error, the issue should stay in TODO state itself.
How do i make this happen?
By referring to below post,I have added groovy post-function, where script fetches issue field values and send to external application. The response received is stored in custom field('ERROR").
https://community.atlassian.com/t5/Jira-Questions/Send-a-HTTP-POST-as-a-post-function/qaq-p/312384#U1417806
Now how do i add condition/block transition that, if external application returns error message, how to stop the transition happening(e.g. the issue should stay in TODO state itself with error message from external application)?
Please let me know how to achieve this?