Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira Automation: JSON & how to use parent issue custom field as assignee for sub task

Hi! 

I am trying to use JIRA Automation to create sub tasks in a parent issue, as a part of onboarding. This means the parent issue will be created by somebody, and a custom field - Manager - where the JIRA user responsible for the new employee will be selected. 

So, I can create the sub task when the parent issue is transitioned, but I am struggling to set the Manager as an assignee for the sub task. 

 

I am trying to add this as a JSON script under More options / Additional fieldsat the bottom of the Sub Task feature, but the rule fails to add assignee. I have tried with various variations of triggerissue, parentissue, .key, .accountId and so on. 

{
"fields": {
"assignee": { "id": "{{triggerissue.customfield.10091.accountId}}" }
}
}

Any help is greatly appreciated. Thanks! 

 

2 answers

Hi @Bård Karstensen 

I notice there is a typo in your JSON expression:

{{triggerissue.customfield.10091.accountId}} should be 
{{triggerissue.customfield_10091.accountId}}

Kind regards,
Bill

Thank you @Bill Sheboy 

This solved the problem for me. 

Like Bill Sheboy likes this

Refer to the image below.

In field #1 choose Assignee.

In field #2 choose Copy From Parent.

Screen Shot 2021-12-03 at 7.52.06 AM.png

Thank you @Trudy Claspill 
This could have been a solution, but in this particular case the assignee for the sub tasks would not always be the same as assignee for the parent issue. 

Suggest an answer

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

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

743 views 23 27
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you