I need to do some rather complex operations in certain transitions, which I can't realize with the built-in post functions. However, I can use automation rules for that.
Now I'd like to know how I can trigger those rules specifically for those transitions. In Data Center, I don't see the option to use a certain transition as a trigger.
Perhaps webhooks could be a solution? At least, post functions can trigger webhooks and webhooks can trigger rules. Would that be a good idea? I don't really know much about webhooks and how to configure them.
Hi @Tim H_
I haven't utilized webhooks in that manner before, but it should be effective.
Another option is to create a custom field and utilize the Field Value Change trigger.
Hope that helps
Best regards
Sam
Hi @Samuel Gatica _ServiceRocket_,
thank you for your input. I set up a webhook and it worked.
1. Create automation rule that's triggered by an incoming webhook. Copy the respective URL.
2. Add a webhook listener, use the URL and add ?issue=${issue.id}
3. Now I can use the triggering issue inside the automation rule, e.g. in order to copy values from.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tim H_ -
In automation rule, you can just use the triggering event of "Issue Transitioned" to conduct your alternative post-function-like operations. Don't if you already try it or not.
Hope this helps.
Best, Joseph Chung Yin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you for this idea. There is indeed a trigger "Issue Transitioned". However, I can't select a particular transition. I'd like to select "Workflow A, transition X". That's possible for actions, but not for triggers.
Instead, I can define a "From" and a "To" state. I can't even restrict it to a workflow. Thus, every time an arbitrary workflow that transitions from that state A to B would trigger the rule. I think that's very error-prone and can lead to unwanted effects when creating new workflows.
In my case, it wouldn't even work. I have several transitions from A to B and I want different rules to be triggered, depending on the transition.
Best regards,
Tim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A transition is exactly this - an action from state A to state B. even though you can’t choose the workflow in the trigger this could be restricted with either the type of rule (single project) and/or further with condition asking for the issue type.
Thus it will only run actions whenever the condition is met and makes the rule much easier and a lot less complex to handle and maintain.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Stefan Salzl,
thank you for this clarification. Unfortunately, I didn't find a way to make this work in cases where I have more than one transition from A to B and I want the rule only to be triggered for one of the transitions.
As you can see above, I found a solution by using webhooks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
aaaah i see. Thanks for the clarification. Great to know you got the perfect solution for your case (y)
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using webhooks to trigger automation rules works flawlessly. However, after reading this document from Atlassian, I wonder if this is a good idea. They say that using webhooks may slow down your system and that webhooks should be avoided if possible.
I was planning to use them as a trigger for automation rules. They should not listen to certain events like issue created, but are called explicitly from a post function.
I wonder...
- if it's a good idea to use webhooks like this from a performance perspective.
- if I could (should?) use custom events instead of webhooks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tim
A webhook post-function is just going to send a JSON payload from Jira to somewhere else thats listening for it - in our org we use these to trigger CI/CD or Ansible to then do builds or run playbooks. I suppose you could have an automation listening for this webhook on the same Jira server but I have not seen it used this way before, so unsure if it would work.
As others have suggested above there maybe be other ways to use automation to update your issues (similar to post function actions) - such as issue transition or field update triggers to start your automation.
Regards, Jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jamie Rogers,
thanks for your ideas. As I mentioned in the other answer, the issue transition doesn't work as a trigger. A field update trigger could probably work. But it seems cumbersome and error prone :-(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.