Automation: Create issue timing problem when using the Create menu item

Steven Happee February 8, 2021

Hi All,

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:

Automation - Create Issue.png

The rule works perfectly fine when I create a new issue using the "+ Create issue" link below the Backlog:

 

Create Issue (below Backlog).png

But it fails when I use the "Create" button in the menubar:

 

Create Issue (in menubar).png

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?

3 answers

2 accepted

0 votes
Answer accepted
Steven Happee February 8, 2021

Thanks, Bill and John ;-)

 

There's no error and in both cases the rule fires. It's about when the rule fires.

 

Automation Rule Explained.jpg

 

I tried to add the Re-fetch action, but that didn't solve the problem.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 8, 2021

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.

Thanks,

Bill

Like John Funk likes this
0 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2021

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? 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2021

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.

Steven Happee February 8, 2021

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).

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2021

You are certainly free to offer the feature request of the "pre-create-issue" functionality, but that simply doesn't exist at this point. 

Like Bill Sheboy likes this
0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 8, 2021

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.

 

Best regards,

Bill

Suggest an answer

Log in or Sign up to answer