Automation For Jira is an awesome part of the Jira toolbox. So awesome in fact that some of my clients don't purchase other apps that could make my life easier when I am implementing their business processes. One of the problems that I recently had to solve is how to trigger an Automation For Jira rule from a post-function.
In my case, the entire purpose of the transition is to execute this Automation for Jira rule, which updates a linked issue. I don't want to change the status of the trigger issue, just execute the rule when the user presses the transition button.
I came up with a couple of different ways that I could do this. One approach is to create a special custom field whose value I could change as part of the post-function. I could use the Field Value Changed trigger looking at this specific field and run it when the value of the field changed.
I rejected this for two reasons. First, as a Jira Administrator, I don't like to create custom fields that have no apparent value to the user and appears on no screens. Secondly, it creates an administrative problem because the next administrator has to rely on reviewing documentation to understand the purpose of this field. This is risky if the administrator is like me and likes to keep the Jira environment clean and tidy.
The approach that I settled on uses Automation For Jira's ability to be triggered as an incoming webhook. I created the Automation For Jira rule using the Incoming Webhook trigger. I then created an outgoing Webhook that calls this webhook passing the issue key. In the post-function, I use the Trigger a Webhook post-function to call the webhook. This triggers the rule on my issue.
Do you have another way to trigger an A4J rule from a post-function? Do you prefer the "Field Value Changed" approach that I rejected?
Derek Fields _RightStar_
Atlassian Practice Manager
RightStar
77 accepted answers
11 comments