Auto-recategorize all children after changing EPIC category

Maartendirickx
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 3, 2024

I'm trying to categorize all children of an EPIC in a Jira Work Management (Team Managed). Actually, I want color-coding and only Categories offer this feature as far as I understand.

The hierarchy is Epic> {task,purchase,bug} > subtask. The epic gets a category and this should flow through to all newly created items with that epic.

Is there any way this can be achieved?

I couldn't figure out how to automate that on creation, and I went for a work-around: Say I have created 15 new tasks for epic proj-123. I change the category of proj-123 and automate that those children get updated. 

That boils down to:

  • Trigger: field value change for Category
  • Branch: for all the issues in the Epic
    • Action: edit the Issue fields, copying it from the triggering issue.

I used the JSON:

 

{
"fields": {
"Category": "{{triggerissue.Category.id}}"
}
}

Unfortunately, this fails with:

Edit issue
Error editing issues
PROJ-999 (Specify a valid 'id' or 'name' for Category (customfield_10033))

 

Any help is kindly appreciated

1 answer

1 accepted

5 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.
April 3, 2024

Hi @Maartendirickx -- Welcome to the Atlassian Community!

Unfortunately, there are now at least 3 fields named "Category" in Jira projects, of which the field for team-managed, business projects is only one. 

Selecting it from the Edit Issue action field dropdown does not work (and shows the JPD Category field for my site).  Here is the open defect for that symptom: https://jira.atlassian.com/browse/AUTO-803

I also tried the "fields" format for the JSON edit and that did not work.  The work-around is to use the custom field id and the longer "update" format for the JSON edit.

{
"update": {
"customfield_10064": [
{
"set": {
"id": "{{triggerIssue.customfield_10064.id}}"
}
}
]
}
}

That is the custom field id for my site.  To find the custom field id for your field, please use this how-to article with an example issue from your business project: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Kind regards,
Bill

Maartendirickx
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 3, 2024

Thanks @Bill Sheboy! Works like a charm.

Unfortunately, there are now at least 3 fields named "Category" in Jira projects, of which the field for team-managed, business projects is only one. 

If only the human mind could remember numbers like words, IT would be a whole lot easier :)

Here is the open defect for that symptom: https://jira.atlassian.com/browse/AUTO-803

Added myself to "this affects my team", hope it helps your use case as well.

Cheers,

Maarten

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events