Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,342
Community Members
 
Community Events
168
Community Groups

Using JIRA Automations how can I set the team of a sub-task to equal the parent issues team value?

I have a situation for reporting that we want to report on teams and subtasks, but noticed you can not set the team of a subtask out of the box. Is it possible to do via an automation? 

 

My trigger is very simple 

When: Issue Updated

Issue Type is one of - Sub Task, Bug - Sub Task (custom) 

Then: Edit issue Fields 

I then have this in the edit field, but feel like I'm missing something 

{
"Fields":{
"Team": {{ parentIssue.fields.Team.value }}
}
}

 

(JSON is not my strongest language) 

Any help is welcome!

Thanks,
Dave

 

 

 

 

 

1 answer

1 vote

Hi @Dave Markowski 

First thing, find the custom field id for your Team field, using this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

If the field is not present in the results, you probably cannot set it.

If the field is present, try setting it using the JSON syntax for a single-select field: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Single-select-custom-field

Kind regards,
Bill

@Bill Sheboy ok so found the custom field id - customfield_12300

"customfield_12300": {
"id": "203",
"title": "FS - Aurora - White",
"isShared": true,
"name": "FS - Aurora - White"
}

Now how would I read it into the sub task?  

{
"Fields":{
"customfield_12300": {{ parentIssue.customfield_12300.name }}
}
}

Please take a look at that second documentation link I sent; it shows two examples of how to do this, using the single-select id or the value.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

5,068 views 18 32
Read article

Atlassian Community Events