Using Jira Automation can I set an action to assign the issue to a Custom field

vshah June 1, 2020

On the project I have a custom field "QA Responsible"of the type - User Picker (single user).

Now I want to use Jira Automation so that

when issue transitions 

the Assignee of the issue changes, to the value from the field "QA Responsible".

I have configured the below , but not getting the desired results

 

image.png

2 answers

1 accepted

0 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 1, 2020

Hi @vshah ,

Are you able to assign the issue to the user doing it manually? It looks like the user you are trying to assign the issue to by Automation does not have that permission. You can verify with the Assignable User permission in the Permission Scheme attached to the Project. 

vshah June 1, 2020

@John Funk

Yes John I am able to assign/reassign /unassign issues manually.

vshah June 1, 2020

Also the user to whom the automation is trying to assign:

- has the requisite roles

- and can be assinged the issue manually.

vshah June 1, 2020

I think this is something to do with the custom field , after modifying the formula the assignee field is getting blank - unassigned and the audit log is showing success.

So probably, automation is not identifying the value from the custom field 'QA responsible' which is User Picker (single user) type.

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 1, 2020

Probably so. Can you share a screenshot of the details of when you are setting the value of the field?

vshah June 1, 2020

QA Responsible field value :Before

 

 

before.pngAfter selection.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.
June 1, 2020

Sorry - I meant the details of the Rule itself - for the Then Assign issue to component. 

vshah June 1, 2020

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.
June 1, 2020

Your syntax is wrong there.

I think I would rather do an Edit issue component instead of Assign the user.

Then you can edit the Assignee field to copy from the QA field. If that doesn't work out we can go back to the this option and work out the syntax. 

vshah June 1, 2020

John,

In edit issue,  we dont have the option to update the assignee to a custom field. So I chose to Assign the Issue. Can you help me with the syntax ?

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.
June 1, 2020

Choose the Copy From option from the three dot menu on the right. 

vshah June 1, 2020

Wow. It worked. Thanks a lot John.

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 1, 2020

You sound like my wife when I fix something around the house without burning it down. hahaha. 

You are welcome. I am sorry it took so long to get you to a solution.  :-)

Like vshah likes this
René Lind September 24, 2020

@vshah could you show me the rule that works. trying to do the same :) 

vshah September 24, 2020

Assign to QA reposn (custom field).png

 

@René Lind 

Let me know if you require anything else

René Lind September 24, 2020

Thanks for the reply @vshah 

Here is the rule i am trying 

In en Epic there is a field called Teknikere. Its at "User Picker (multiple user) 

If that is updated i want specific issues attached to the epic to be reasigned to the first user in teknikere.

Its not working yet so any adwise would be greatly appreciated. 

Regeards René 

 

This is the rule so far

automation.png

vshah September 24, 2020

This one looks tricky. Note sure if this is supported by Jira as of now.

@John Funk can you look into 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.
September 24, 2020

I don't know of any way that automation could know which is the first value selected in the list. 

You could probably create another rule that walks down the chain of people in the list and set the value of a new custom X user picker field.

Something like this for the multipicker Teknikere field:

John

Vshah

René 

The rule would say if the value for Teknikere changes then have an If/Else:

If John, set new custom field X value to John

Else if Vshah, set custom field X value to Vshah

Else if René, set custom field X value to René 

Then you could assign the card to the user based on the value of the custom field. 

0 votes
Yervand Mazlumyan December 15, 2020

Hi @John Funk I am experiencing a similar issue. Below is the rule I have. 

screenshot.png

The Developer is a custom single user picker field in the Next Gen project. According to the History the value has been assigned, however, the actual field is still blank. The problem is only with user picker fields. All other types are working correctly. I wonder if that has something to do with the NextGen project. Any ideas?

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.
December 15, 2020

Yes, it is probably because it is a Next-gen project. 

Try using this code:

{
"fields": {
"assignee": {{issue.Developer. accountId}}
]
}
}

Yervand Mazlumyan December 15, 2020

It's still not working. I think it's just one of the limitations of the Next-Gen project. At least for now. 

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.
December 15, 2020

Can you share a screenshot of what you have? 

Maybe use the custom field id, too, like this:

{
"fields": {
"assignee": {{issue.customfeild_16999. accountId}}
]
}
}

Where 16999 is replaced with the id for your custom field. 

Yervand Mazlumyan December 15, 2020

I used with the name. According to Atlassian, you can now use custom field name. 

 

{
"fields": {
"Developer": {
"value": {{issue.assignee}}
}
}
}

Yervand Mazlumyan December 15, 2020

Basically, what I'm trying to accomplish is when the developer moves the issue from To Do to In Progress, the issue should automatically assign it to the developer and also set the Developer custom field to the developer. It's used to track the original developer.

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