I have had to split one automation rule into two because the rule runs so fast that the two fields we want updated do not both get updated when the rule is in one. The first part of the rule executes and the mathematical calculation happens and the value is stored in the first field, but the second part, where we update the second field with a corresponding value based on the calculation is not getting done.
So we are attempting to have the first part of the process placed in one rule and have that call a second rule. We have split the logic, checked that both rules can be called by other rules, they are both global rules and.... now what? I do not see anything under actions that says, "Call a rule."
Hi Malka,
What if you left it as one rule and had Automation do a Refresh of the issue prior to the update of the second field? It's a blue Action type called Re-fetch issue data.
John I wish I could also accept your answer as tossing in two of the Re-fetch issue back to back solved the problem of the race condition I was having. Since Jack did cover the split of the rule and was first I did select his answer. Thank you for chiming in though!! Very simple, explicit and easy to read answer from you. I appreciate it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You will need to ensure the first rule results in an event that can be used as a trigger in the second automation. I have not attempted but wonder if this doc tip might not help though. Worth a go I guess.
If this issue is affecting your rule, you can introduce a delay into your rule by adding a number of Re-fetch issue data actions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm using the refetch function for a couple of rules, however, it still seems to fail every so often. I've had to set up another job that detects when rule 1 has run but rule 2 has not (Based on JQL), then using that as a trigger to redo the missing calculation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure - this might be unique to how we're doing this work.
Setup - during workflow transitions, timestamps are recorded in 3 custom fields using post functions. We have plugins that make this easy, but it's possible to do this in lots of different ways.
Rule 1 calculates lead time by diff'ing our "To Do" timestamp and our "done" timestamps.
Rule 2 calculates cycle time by diff'ing our "In Progress" timestamp and our "done" timestamps.
Both rule 1 and 2 run on a list of projects, and are triggered on transition into "done" from a list of other statuses.
This is where things sometimes go weird. Both rule 1 and rule 2 have re-fetch values as an attempt to delay them. Cycle times has never failed. Lead time fails occasionally, even though they're clones with slight modifications.
Rule 3, an upkeep rule (I just call it that) detects missing data by:
status = "DONE" AND "Lead Time" is EMPTY AND "Cycle Time" is not EMPTY.
That rule runs once a day, and appears to fix 1-2 bugs a day. By checking to see if Cycle time is filled (which never fails for some reason), I can tell if lead time should have as well.
I admit it's a bit convoluted, but appears to do the trick.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. I may do that in a different situation. I need something that will return the data in real time for now. the re-fetch seems to be working but I like your daily "job" idea for things that aren't time sensitive.
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.