Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Automation fails to set active sprint

Brad
Contributor
March 18, 2021

We have a rule that automatically sets the sprint on on issue given certain conditions.

The rule is configured to set the sprint to the active sprint of a board (which is available in the dropdown for the Edit Issue -> Set Sprint action).

 

Screen Shot 2021-03-18 at 2.49.14 PM.png

The rule fails with the error:

No fields or field values to edit for issues (could be due to some field values not existing in a given project):

Screen Shot 2021-03-18 at 2.49.34 PM.png

Initially, this failure seemed to be only for one of our boards. Now, it fails for all boards. I can manually set the sprint to the active sprint for that board. There is only one active sprint on each of those boards.

3 answers

1 accepted

3 votes
Answer accepted
Brad
Contributor
March 24, 2021

Well I feel sheepish. This was due to a permission issue on the boards. The filter share was not allowing the Jira Automation user to inspect the active sprint.

The options to fix are to change the actor for the automation, or open the permissions for the board filters. In this case, we chose to share the board filters at the project level.

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.
March 24, 2021

Thanks, Brad, for sharing that information!  That is a good symptom to watch for with automation.  Odd error condition for a permission error.

__Bill

Like Brad likes this
0 votes
Brad
Contributor
March 18, 2021

*deleted*

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.
March 18, 2021

Hi @Brad 

Is this for an Issue Created trigger?  If so, I wonder if this is related to the known race condition where the issue isn't fully available when the event is caught by the trigger.

If so, please try to add a Re-fetch action immediately after the trigger and before any other actions.

If not, would you please post an image of the complete rule where you are seeing this symptom?  That may provide more context for the community to answer.  Thanks!

Best regards,

Bill

Brad
Contributor
March 18, 2021

Hi @Bill Sheboy , thanks for taking a look for me!

 

The trigger is on an issue transition. Here is the start of the rule. The failure is on steps such as the Edit Issue step you see selected. I can provide the rest of the issue if required, but it's quite long and just repeats the same pattern for many teams:

Screen Shot 2021-03-18 at 3.49.07 PM.png 

Screen Shot 2021-03-18 at 3.49.27 PM.png

Screen Shot 2021-03-18 at 3.53.37 PM.png

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.
March 18, 2021

Thanks for that information, Brad.

First thing: branches are a bit slow in automation rules, even when they get in-lined.  Consider replacing that structure of branching on the current triggering issue to use a long If/Else condition instead.  Plus, the rule will be smaller.

Next, I see no condition on the issue type after the trigger, so I wonder if you are sometimes catching an issueType which normally doesn't set the Sprint field.  Thoughts?

Next to confirm my understanding of the situation:

  1. Is this a one-project rule, with multiple teams and boards, and sprints, or
  2. Is this a global/multiple-project rule spanning the instance?
Brad
Contributor
March 18, 2021

Thanks for getting back to me. Great info around the branches, I will refactor for sure.

The trigger doesn't specify an issue type, but this particular transition is only applicable to standardIssueTypes, so we are good there. I've confirmed all instances of the error are happening on Story/Task issues, which have all these fields available.

The situation is #1. A one project rule, with multiple teams and boards and sprints. There is a 1:1 relationship from the boards in question for this rule to active sprints.

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.
March 19, 2021

Hey, Brad...Okay, I am stumped on this one.  I found this defect/symptom which may be related to what you are observing:

https://codebarrel.atlassian.net/browse/AUT-1769

It states that when parallel sprints are enabled, Next Sprint cannot be accurately determined.  So I wonder if the same is true for active sprints.

Here is my recommendation: as the site admin of a paid instance, submit this as a defect to Atlassian Support: https://support.atlassian.com/contact/#/

They will be able to see what you see, and check more logs than we can, to perhaps unravel this one.  Once you hear back from them, please post what you learn so others can benefit.  Thanks!

Brad
Contributor
March 23, 2021

Thanks a ton for all your guidance. I will come back with results for sure.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events