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

How can I update an issue's category via Automation?

Brock Jolet June 1, 2023

I've found a couple of similar posts, but they're not exactly what I'm looking for.

I am using Category in a JWM project because the "Group by:" options do not allow me to use Components or Labels or anything similar. However, I don't want to manually update every task and subtask when I assign a Category to an epic.

I want an automation rule that updates the children when the epic's Category is changed.

 

I am able to trigger a rule when the Category field changes. Then I perform a branch search for the following query:

parent in ({{triggerIssue.key}}) OR parentEpic in ({{triggerIssue.key}})

 But I cannot figure out how to copy the value from the triggerIssue to these other issues; Category is not an option in the easy field picker and everything I try in the Additional Fields section throws an error.

 

To use the field in a filter, it's formatted as "Category[Category]", but using {{issue.Category.value}} appears to work as a smart filter.

2 answers

1 accepted

1 vote
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 1, 2023

The category is a special custom field, and can only be set by using the More options and the advanced field editing. You need to find the ID for the category you want to set, one way of doing that is to have manual triggered automation that has a log action that you set to {{issue.Category}}.

This is what the JSON would look like to set the Category:

{
"fields": {
"Category": {
"id": "<Category Id>"
}
}
}
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 1, 2023

And if you are copying the category from the trigger issue the JSON would look like this:

{
"fields": {
"Category": {
"id": "{{triggerissue.Category.id}}"
}
}
}
Like # people like this
Brock Jolet June 1, 2023

Thanks, @Mikael Sandberg ! That worked perfectly!

Like Mikael Sandberg likes this
Elizabeth Jones
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 14, 2023

I receive the following error: Additional fields contains invalid field(s) in 'update' or 'fields' section: Category

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 1, 2023

Hello @Brock Jolet 

When asking for help with an Automation Rule you have constructed it is very helpful if you post an image that shows all the steps in your rule.

In general if you are triggering a rule based on a change to a "parent", then the way to cycle through and update the "children" is to use the Branch option. You can use Branch For Related Issues Subtasks to update the direct subtasks of an issue. If the trigger issue is an Epic then you can use Branch For Related Issues Stories to update the child issues of the Epic.

Screen Shot 2023-06-01 at 10.44.19 AM.png

If the subtasks are under the child issues you will need to create two rules; one triggered by the change in the Epic and updating the child issues, and a second triggered by the change in the child issues and updating their subtasks, because Automation rules don't support nesting branches.

Brock Jolet June 1, 2023

Thanks, @Trudy Claspill . I ended up using the JQL from my post to avoid needing two rules. The suggestion from @Mikael Sandberg helped me with the last bit that I needed.

Suggest an answer

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

Atlassian Community Events