Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

automation - change assignee to a person from a custom field

Scott Thurston
Contributor
September 8, 2020

I have searched for the solution to this but just have not been able to figure it out.  I want to have rules as an issue transitions that the assignee is changed to the value from another custom field.  There is a custom field for Developer, Tester, Approver etc.  I have not been able to reassign the assignee field.  I am sure there is an easy solution to this but have not been able to figure it out.  Can someone tell me what action to use and how to enter the value?

Thanks,

4 answers

1 accepted

0 votes
Answer accepted
Joe Hankin September 8, 2020

OK. I have the answer...

You Assign Issue, and select Smart Value.

But you write it like this...

{{issue.[custom field name].accountId}}

eg. {{issue.editor.accountId}}

 

I also think this will work too...

{{issue.customfield_XXXXXX.accountId}}

Scott Thurston
Contributor
September 14, 2020

@Joe Hankin thanks for your help!

0 votes
Rashmi Ratnani
Contributor
December 7, 2023

Hi @John Funk

I want to be able to do the opposite i.e. edit a custom field to copy the assignee when the status of an issue changes. Should I use trigger issue or current issue? Doesn't seem to be working. 

For e.g. If Bug changes from To Do >> In Progress  Then Custom Field == Assignee

0 votes
Scott Thurston
Contributor
September 8, 2020

Do I use smart value and pick {{issue.QA Resource}} ?

0 votes
John Funk
Community Champion
September 8, 2020

Hi Scott,

Do you have a rule built already using Automation For Jira?

If so, use the Edit Issue action and not Assign User action. Then Select Assignee and copy the value from another field. 

John Funk
Community Champion
September 8, 2020

I would just use Copy from Current Issue. 

Then click on the words Current Issue and that will give you a popup where you can select the QA Resource field. 

Scott Thurston
Contributor
September 8, 2020

Here is what I have so far.  Will this work?

            When: Issue transitioned

                 TO

               Business Sign-Off

             Then: Assign the issue to

                {{issue.Product Owner}}

Scott Thurston
Contributor
September 8, 2020

@John Funk I don't see how Edit Issue action would work as it does not let me update the assignee field to a value from another field on that same issue.

John Funk
Community Champion
September 8, 2020

Can you share a screenshot of that?

It should look something like this:

screenshot.png

Like Scott Thurston likes this
Joe Hankin September 8, 2020

Hello @John Funk ,

 

I'm having the same issue.

When I select Edit Issue, and Copy From Issue, the fields available are only:

  1. Assignee
  2. Creator
  3. Reporter
  4. BAU / Project Lead
  5. Owner

No custom fields available.

However, when I change to Assign Issue and select Smart value, I can add some smart value content like {{reporter}}, but I want to use {{issue.Editor}}, but it isn't working. Even when I use the custom value too, like {{issue.customfield_XXXXX}} I just get an error.

It would appear possible here: https://community.atlassian.com/t5/Jira-Service-Desk-questions/Automation-for-Jira-Change-the-Assignee-from-a-custom-field/qaq-p/1398101 but I can't get it working.

 

Any help would be much appreciated.

Joe Hankin September 8, 2020

@John Funk this is the screenshot, showing that we can't use Custom Fields:

JIRA.png

John Funk
Community Champion
September 8, 2020

Hey Joe - It's probably because the field is not available to either the project or the edit screen. Check the field Owner to see what is different about it because it is a custom field, too. 

Joe Hankin September 8, 2020

Hi @John Funk I thought this might be the case too. But I wasn't sure because this is a Next-Gen project,  and created via the project settings interface which means the field is automatically in the project edit screens on the board etc.

I added my way around it below. 

Would be good to get a little clarity as to whether or not this is the only way?

John Funk
Community Champion
September 9, 2020

Hey @John McKiernan  - can you bring any clarity to the custom fields for Next-gen not showing as available to copy to the Assignee field?

@Joe Hankin  - Isn't the Owner field a custom field? What's different about it than the other custom fields that aren't showing?

Joe Hankin September 9, 2020

Hi @John Funk 

Yes this is in fact a custom field. But it wasn't set from inside the project, it seems to have been setup at a high level. Is my work around below not an easy way around it?

Here are the details on the custom field called Owner.

Default Configuration Scheme for Action Owner

Default configuration scheme generated by Jira

This field will be available on issues of any typein all projects

John Funk
Community Champion
September 9, 2020

If your work around does what you need it to do, by all means use it! :-)

But it shouldn't be that difficult and you shouldn't have to use smart values as your only option. 

Suggest an answer

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

Atlassian Community Events