Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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
John Funk Community Leader Feb 08, 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 Feb 08, 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.

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 Feb 08, 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
Answer accepted

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.

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

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
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

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

7,047 views 8 28
Join discussion

Community Events

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

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you