Setting the Assignee of a sub task based on a user (custom field) set on the issue.

"fields": {
"assignee": { "name": "{{issue.parent.fields.Marketing Manager.key}}" }

Hey chaps,


Having trouble getting this working!  help help help.


I've tried using a comment to debug my json.



Marketing Managerv1.01:
{{issue.parent.fields.Marketing Manager.displayName}}

{{issue.parent.fields.Marketing Manager.key}}



which returns:



Marketing Managerv1.01: 
Bevan Miller [Administrator]



It looks to be a problem with the Assignee field setter  because if I simply do;

  • Manual Trigger
  • For all sub tasks
  • Edit Field - set assignee and choose someone from the drop down
  • Comment to ensure it runs 


and the comments are updating proving it's got there, however the assignee does not change


4 answers

Dave, are you using a ScriptRunner post function or event listener here?

You're getting values printed with your debug code so that proves that the source values are there and correct.  I'd look into the setter.  Is assignee settable via the method you're trying?  Try hard coding assignee value and see if it throws any errors. 


Maybe use this instead: PUT /rest/api/2/issue/{issueIdOrKey}/assignee



No.  Is that something you'd recommend?  How do I implement that?

I'm using Automation for JIRA by code barrel.

@Dave Gibbons- Did you ever manage to solve this? Your solution is much appreciated.

Thank you!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

201 views 4 1
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you