Forums

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

Trying to use smart value to auto-assign task, but keep getting error "User not found"

Kokko Tso August 6, 2021

For my JIRA Next-Gen project, I've organized my project into Epics with a collection of child issues. At the Epic level, I have a custom field (People) labeled "CMS Specialist" where I designate a specific individual.

I'm trying to create an automation where, once the issue is transitioned to a specific status ("Content Load in Progress"), the issue is auto assigned to the CMS Specialist designated in the field mentioned above.

assign issue smart value.png

I'm trying to use the smart value {{issue.epic.CMS Specialist}} to pull from the parent epic and set the assignee for the task, but every time I test this, it fails. Audit log shows the following error message: 

"Specified user does not exist or you do not have required permissions"

The weird thing is that it occasionally works for a (very) small group of users, but not most. I have administrator permissions for my board, so I don't think it's a permissions issue. I also tried making sure that the smart field was correct by creating a new automation that set the description to the {{issue.epic.CMS Specialist}} field, and that worked correctly. It returns the following in the description field on trigger:

{self=https://sbd-appsvcs-ebiz.atlassian.net/rest/api/2/user?accountId=xxxxxxxxxxxxxxx, accountId=xxxxxxxx, avatarUrls={48x48=https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/xxxxxxxxxx, 24x24=https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/xxxxxxxxxxxx, 16x16=https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/xxxxxxxxxxxxx, 32x32=https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/xxxxxxxxxx}, displayName=xxxxxxx, active=true, timeZone=America/New_York, accountType=atlassian}

I've x'ed out the person's name and id in the example above, but it's the correct person.

Any ideas?

4 answers

1 accepted

3 votes
Answer accepted
Kokko Tso August 6, 2021

Ah, wait - okay, so apparently, if I use {{issue.epic.CMS Specialist.accountId}} it works. I guess the assignment via automation doesn't parse the smart value / People object, or something like that?

0 votes
Yuanfang Fu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 20, 2022

This was amazing, I was trying {{issue.Custom Field.displayName}} where Custom Field was a User Picker (single user) to no avail.

I did use the 'Log action' block to audit log to test some properties such as:

{{issue.Business Owner}}, {{issue.Business Owner.displayName}}

displayName returns fine but is not accepted by 'Assign Issue to' block, where the first is a hash value. But your answer works exactly - thank you!

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2021

Hi @Kokko Tso -- Welcome to the Atlassian Community!

For a question like this, please consider posting an image of your complete rule and of the audit log, showing the rule execution.  That will offer more context for the community to offer ideas.  Thanks!

Without seeing your rule, I have no idea how this could work as shown.  When a rule is triggered for an issue, it has access to the data for that issue.  There appears to be some information for parents, but certainly not all of the fields. To get other data the rule would need to branch on the parent, or use one of the features of issue edit, such as "copy from parent".

Assuming your rule is triggering on a child of the epic, this would work:

  • trigger: issue transitioned
  • condition: issue has a parent
  • branch: on epic parent
    • action: create variable, setting it to {{issue.CMS Specialist.accountId}}
  • action: edit issue to assign the the value in the created variable

If I am misunderstanding your use case, would you please provide more details?

Best regards,
Bill

0 votes
Fabian Lim
Community Champion
August 6, 2021

Hi @Kokko Tso

I would check if all the cms specialists are assignable users in the permission scheme. User fields usually pick up any jira users, but they may not have permissions to be assignable users in the project.

Kokko Tso August 6, 2021

Hi Fabian,

Thanks - that was my first thought too, but they are all under the standard "Members" group with permissions to edit and create issues.

Suggest an answer

Log in or Sign up to answer