I'm struggling with an Automation Rule based on the Create Issue trigger. What I want is to pre-fill the Description field of every new issue. I created this rule:
The rule works perfectly fine when I create a new issue using the "+ Create issue" link below the Backlog:
But it fails when I use the "Create" button in the menubar:
When using this second creation method, the description is not pre-filled. In fact, after filling the Description field and pressing Create on the Create-dialog, the Description was overwritten with the pre-fill text (that's why I added the IF statement in the rule).
It seems to be a timing problem: the rule is not triggered after pressing the Create button on the menubar, but only after pressing the Create button on the Create-dialog.
How do I get my rule triggered in time in both situations?
Hi Steven - Welcome to the Atlassian Community!
The Automation shouldn't care which create button you are using - it should fire both ways.
Is there an error message on the second way? Or does it just not fire and there is nothing in the Audit Log?
Ah, I see what you are asking now. No, Automation for Jira cannot pre-fill the field as the rule is running. It only fires the action as the rule completes. But it should still be populating the field when the rules finishes. Meaning, in your case that the Description field should be populated.
The user can NEVER edit information in the middle of a rule firing.
That's true, the description is still populated. Without the IF statement, the Description entered by the user was overwritten by the rule. With the IF statement, the Description field is only populated if the user left it empty. In any case, the Description field in the Create dialog doesn't show the pre-fill text from the rule.
I think it's not "in the middle of the rule firing". If I cancel the dialog, the audit log shows no activity. So I assume that the rule is fired after the user pushes the Create button on the dialog.
The solution would be that Atlassian creates a new trigger called "pre-create-issue" that fires before the Create dialog is shown. Or to change the timing of the current create-issue trigger to fire before the dialog (I don't know what impact that would have on other areas, though).
Steven, thanks for that information. John is correct that you are suggesting a new feature that would replace the pre-fix internals of the field editor. The Re-fetch automation action would not help in that use case.
As an alternative, please consider checking the marketplace to see if there is an add-on for purchase which would allow templating the field. I haven't used anything like this in Jira so I do not know if such an add-on even exists.
Hi @Steven Happee -- Welcome to the Atlassian Community!
To be clear, are you saying the rule is not firing in the different paths, or that the rule is firing and overwriting an existing Description because one is not found yet?
If it is the second case, that is a race-track condition which can happen in rules where the Issue Created is triggered before the issue is fully persisted/available. The work-around fix is to add a Re-fetch action immediately after the Trigger and before the Condition. That will slow down the rule and reload it before continuing processing.
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event