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

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}}

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

 

 

which returns:

 

 

Marketing Managerv1.01: 
Bevan Miller [Administrator]

Key: 
admin

 

****Update****
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 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

1,098 views 7 0
Join discussion

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