I have a project automation I'm working on but I need to get a Name - that is a string format - and put into a User Picker (single user) customfield.
This doesn't resolve the name though and using a "Edit work item" doesn't work either.
Has anyone been able to use a string value to search a username that I can enter into a field, that in turn is used to become the approver for a status in a workflow?
The field has the chance to change, which is why I'm pulling it from an Asset field using a lookup. I've looked into assets and they dont have a "user" type for fields either?
AI / Rovo suggests that I can resolve the string using a lookup value?? I can't figure that out and think its tripping on a hallucination...
Hello @Tim Kennett
You cannot set a User Picker field using the display name of the user.
You could use a Send Web Request action to execute an API call to search for a user that has a matching name and extract the account ID from the results.
You can then use the extracted account ID to set the User Picker field.
If you have not used Send Web Request before, this article can help you get started.
Hi @Tim Kennett
In assets on the object, that responds with a user/employee or else how people are defined, you can create a user attribute.
You can fill this manually or via automation, then also create another attribute last sync date.
Create a Jira automation rule that triggers based on a schedule, without using a JQL clause.
Branch the rule on an AQL search action
Create a variable, example EMAIL, with smart value: {{object.email address}}
Add a Send web request action to get the Atlassian accountID related to the email address
In the Authorisation header, make sure you add the keyword Basic followed by the base64 of your emailaddress:APItoken.
So if the base64 of the emailaddress:APItoken is AB12XY45, then to the Authorisation header add the value Basic AB12XY45
Add the following Web request URL:
https://<Cloud site URL>/rest/api/3/user/search?query={{EMAIL.urlEncode}}Add the Content-Type and "Application/JSON" header
Check the option "Delay execution of subsequent rule actions until we've received a response for this web request" as the response contains the Jira work items linked to the Confluence page
Create a variable to store the accountID of the Atlassian user, example AID, with smart value: {{webResponse.body.accountID}}
Action to edit the attributes of the user object in Assets.
Example:
user attribute: {{aid}}
last sync date: {{now.format("dd/MMM/yy")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.