Forums

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

Setting "Jira User" value through automation?

Michael Gormley April 1, 2025

We have an asset schema that holds user data and syncs daily from Azure AD. When a new hire joins the company, their account is created in AAD, and a corresponding object is created in this user schema with some basic info populated.

We have an automation that's triggered when new objects are created in this schema (when object created in the schema, if objectType = users) with the goal of populating some more fields that aren't provided in AAD.

I'm running into an issue trying to set the "Jira User" attribute in this automation. It's a user-type attribute which I think is complicating things, and I'm not able to simply add an edit-object step and set a value for the attribute. (I've tried things like {{object.Name}}, {{lookupUsers(Name).accountId}}, etc. but the audit log shows errors like "Attribute value is not valid on Objects" or just "Unable to update objects".)

Basically I want to search the values in Jira User for one that matches what's in the user's Name attribute, and set that. From what I've been able to find, assets automation might be able to accomplish this but that doesn't appear to be an option in our instance yet. Is there any way to do this with a regular automation in Jira Cloud?

1 answer

0 votes
Manoj Gangwar
Community Champion
April 4, 2025

Hi @Michael Gormley,

You can do that using the automation rule.
Note: Modify the values of the objects and attributes as per your data.

Example-
1- Trigger Scheduled

2- Branch for AQL- write an aql like (objectType = Users and "Jira Account" is Empty"

3- Then add value to the audit log "User email: {{object.email address}}"  

4- Send web request:
URL- https://yourjira.atlassian.net/rest/api/2/user/search?query={{object.email address}}
Method: GET
Web request body: Empty
Check the box for the Delay execution
Key  - Authorization
Value- Basic and then generate an API token and paste (Example- Basic anNtxhsks2mhdhdddhdhfjfkf)

5- Again, add value to the audit log
(User API) Web Response = {{webResponse.body}}

6- Add {{smart value}} condition for compare two values
First value: {{webResponse.body.size}} Equal Second value: 1

7- Create Variable
Varibale Name: jiraUserAccountid
Smart Value: {{webResponse.body.accountId}}

8- Edit object
select attribute name Jira Account and add the value {{jiraUserAccountId}}

You try this. It should work.

Michael Gormley April 4, 2025

Hi @Manoj Gangwar , thank you for the suggestion. I'm going to see if I can get this working, I'm out next week but I'll follow up once I have a chance to fully test it.

Thanks!

Michael

Like Manoj Gangwar likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events