Automation: How to assign an issue to the user from a custom field

Chris Dunford June 17, 2020

When a rule is executed, we need to assign the issue to the user whose name is in a custom field.

Is there a way to do this? We don't see the custom field in any of the assignment options, including 'Another field value', which shows only standard fields like 'Issue creator' and 'Issue reporter'.

The custom field is defined as a user field, not just text.

2 answers

1 accepted

3 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 17, 2020

His Chris,

So the custom field already exists on the screen and has a value in it?

It should show up when you do an Edit Issue > Set assignee > copy from other value

Can you share your rule that you have along with the details of the assignee value?

Chris Dunford June 17, 2020

Hi John, I'm not sure what screen you mean. It's on our various issue screens, but I'm creating an automation rule. The field does not appear anywhere I can find in the screen used to add an action.

I also don't see a "copy from other value" option in Edit Issue>Set assignee. This is what I see:

jira.png

The custom user field is named 'Issue/project lead', and it's not there.

The rule is: When issue transitioned to Lead Review/If Goal Type is not empty/And Goal Status is 'Ready for Dev'/Then assign to user.

The user I want to assign it to is in the Issue/Project Lead field.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 17, 2020

Instead of using the Assign Issue action, maybe try using Edit Issue instead. Then select Assignee field. 

Then click the 3 dots and select Copy from Current Issue. 

Then click on the words Current Issue which will popup the ability to select another field to copy into the Assignee. 

Like # people like this
Chris Dunford June 17, 2020

Wow, that is obscure. It's not at all obvious that "Current issue" is clickable and leads to the full list of fields.

But it works now, so thanks a lot!

Like Petersen_ Thomas likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 17, 2020

Yes, I stumbled onto it myself many weeks ago.  :-)

I am glad it is working for you now!

Like Petersen_ Thomas likes this
Alex Larini September 28, 2020

Hi, I am trying to do the same, but when I try to create the Automation, the only Action I can find is "Edit issue / Field", and I have no options in "Replace with this value" if not the possibility of inserting a fixed user there, as shown in screen. Why can it be??

image.png

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 28, 2020

Hi Alex - Welcome to the Atlassian Community!

As a side note, you should always create new questions and not add on to previous conversions. Otherwise, no one else will see the question in order to help.

That being said, it looks like you are using built in project automation or forms automation and not the actual Automation for Jira tool. 

Here is some additional guidance to get you started:

There are two types of automation:

  • Global: In the Free version, you get 100 executions per product, per month
  • Project: In all versions, you get unlimited executions per month

Automation Basics: https://www.atlassian.com/software/jira/guides/expand-jira/automation

You can do this via global rules to apply to all projects also. You'll need to be a Jira Admin/Site Admin, go to Jira Settings > System > Automation Rules (left-hand menu).

For more on using Automation For Jira see these help pages.

Alex Larini October 1, 2020

Thank you very much John, but I can't find the "Automation Rules" in "Settings > System".

Also, I have seen in the guide you linked that the screen should be different in the project automations anyway (https://support.atlassian.com/jira-software-cloud/docs/create-and-edit-rules/).

I really don't understand if it is a version issue or what...

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2021

Are you in Cloud or Server?

Also, you have to be a Jira Administrator to see Settings > System

Dzmitry Ananyeu October 3, 2023

@John Funk  thanks for your comments

 

0 votes
Elina Minnie March 25, 2021

HI @John Funk

I ran into the same issue and tried to replicate this:

Instead of using the Assign Issue action, maybe try using Edit Issue instead. Then select Assignee field. 

Then click the 3 dots and select Copy from Current Issue. 

Then click on the words Current Issue which will popup the ability to select another field to copy into the Assignee. 

But when I click on Current issue, I don't see the full list of field, only Assignee, Creator, and Requester, even though there is another custom field with people select which I need to be using. 

Do you know what could be the problem? 

 

Thank you! 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2021

Hi Elina - Leave it with Set value instead of Copy from Current Issue

Then use {{issue.Custom Field}} subbing out Custom Field for the exact name of your user picker field. 

Elina Minnie March 29, 2021

Thank you! 

This configuration worked after all: 

{
"fields": {
"assignee": { "id": "{{customfield_10003.accountId}}" }
}
}

 

Where customfield_10003 is the system name of the field I was fetching the user from. 

Like John Funk likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2021

Great! Glad you got it to work!!

Like Elina Minnie likes this
Mahima Srivastav March 31, 2021

Hi,

For some reason this didn't work for me.

My custom field is "designer". When I run the automation rule, I get an error "(Account ID does not exist. (assignee))"

What am I doing wrong?

Capture.PNG

Elina Minnie March 31, 2021

Hi @Mahima Srivastav ! 

You need to be using the id of this custom field, not its name, so it would look like 

 

{
"fields": {
"assignee": { "id": "{{customfield_10003.accountId}}" }
}
}

 

The id is something like customfield_10003 

You can extract it from the URL, like described here https://confluence.atlassian.com/jirakb/how-to-find-id-for-custom-field-s-744522503.html

Like # people like this
Mahima Srivastav March 31, 2021

Got it. Thanks! Also, can you tell me about the accountID? I tried to use my accountID but it still gave me the same error.

(Sorry, I'm new to JIRA so please excuse my ignorance)

Elina Minnie April 1, 2021

@Mahima Srivastav  leave it as 'accountId'. It should fetch users from the field. 

Mahima Srivastav April 1, 2021

Tried it. Same error. :(

I have no idea why this error exists. I checked the permissions as well, but that didn't work.

My process steps are:

  1. Create Epic named "ORR" with a custom field "designer" (user picker)
  2. Automate creation of issue linked to this Epic
  3. Edit created issue
  4. Copy "Designer" field from Epic to "Assignee"

Will the code be different if I want to copy data from a parent issue?

Capture1.PNGCapture2.PNG

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 1, 2021

Maybe you need to take off the Assignee field update in the top part and just let the JSON part have the code. 

Mahima Srivastav April 4, 2021

Hi John, I did that. The error persists. :(

 

Error: (Account ID does not exist. (assignee))

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 5, 2021

It sounds like the ID you are using is not an active user. 

James Park November 17, 2022

Valid value error I get. I want the automation to get the value from the field called "Requested Assignee" and change the "Assignee" value to that. I get error saying to enter the valid value.. :(

1.jpg2.jpg

Suggest an answer

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

Atlassian Community Events