Forums

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

How to add specific sprint id to Sprint field of Create issue automation rule?

Andras M
Contributor
December 2, 2023

Hi, I would like to add a fix sprint id to my create issue rule (like: sprint.id = 529)

Is it possible somehow with smart id?

sprint.jpg

2 answers

1 accepted

3 votes
Answer accepted
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.
December 2, 2023

Hi @Andras M 

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

Have you tried what you are showing and it did not work?  What did you observe: an error, or something else?

If the sprint is always the same, why not select it from the drop-down list in the field for the action?

If neither of those work, you could try using advanced edit with JSON to set the field by the sprint id value.

Kind regards,
Bill

Andras M
Contributor
December 2, 2023

Hi, I think the question says its all. But you are right, it was just theoretical.

The creation of the issue is supposed to open it in another project, so I cannot see the sprint (of another project) in the dropdown, I supposed. That's why it would be necessary to find it by its id.

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.
December 2, 2023

The {{sprint}} smart value is only available with the sprint-related triggers.  This is one reason I was asking about seeing your complete rule.

If the trigger is instead Issue Created, the smart value {{sprint}} is not available.  Instead it is {{issue.sprint}} ...again depending upon the context within a specific rule.

 

If your rule is something like below, I'd recommend trying setting the value with JSON:

  • some trigger
  • action: create issue in another project
    • edit the sprint field to be for that target project's sprint
Andras M
Contributor
December 2, 2023

Thank you Bill, do you have an example for the JSON?

What should I set there to:

- create an issue on trigger

- action: create issue in another project

-- set the sprint field to a specific sprint of the other project (example: id=123

Andras M
Contributor
December 2, 2023

Ok, so it could be something like this, I guess

{
    "fields": {
        "customfield_12100": [
            {
                "id": "123"
            }
        ]
    }
}

now, I just need to get the custom field's ID of our "Sprint" field... 

Andras M
Contributor
December 2, 2023
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.
December 2, 2023

That technique, also described here with the automation documentation, is quite valuable when working on rules.

Smart values are name, spacing, and case-sensitive, often do not match the displayed name on the issue views, and the structure within the data is important as well.

Using the REST API function will help both confirm if a field is supported by automation and what the correct smart value (or custom field) are for usage.

0 votes
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2023

Hi @Andras M 

Is the Sprint a static component of the rule (i.e the rule would always assign Sprint ID 529 for all issues created)?

Or could the assigned Sprint be dynamic based on some other conditions?

Ste

Andras M
Contributor
December 2, 2023

Hi, only a static sprint.id now, but also interested in the solution for dynamic based on some other conditions :)

Suggest an answer

Log in or Sign up to answer