Forums

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

Set assignee by rule

Antonia
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.
October 21, 2025

Hello,
I am trying to create a rule that creates a ticket for an asset on a specific date and automatically adds the assignee and request participants to the ticket.
So I have an attribute in my asset with a date. If the date is 3 weeks in the future, a ticket must be created. This works so far, but I can't get the assignee and request participants to be set automatically.

The field in which the persons are listed is called “Key Owner.” The first person listed in this field should always be entered as the assignee, and the rest as request participants. However, this does not work with the following values:

  • {{object."Key-Owner"}}
  • {{object."Key-Owner".Mail}}
  • {{issue.Asset-Key-Owner.get(1).accountid}}
  • {{object."Key-Owner".get(0).accountId}}
  • {{object."Key-Owner".accountId}}

The field where the people are listed is an object field containing the users imported from Intune.

Screenshot 2025-10-21 150701.png

2 answers

0 votes
Marc - Devoteam
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.
October 21, 2025

Hi @Antonia 

Is the "Key Owner" field an asset attribute or a custom field of type assets?

What does a log action give you as information, so add log action for the smart values:

{{issue.Asset-Key-Owner.get(1).accountid}} - seems wrong, as this implies Asset-Key-Owner is a user picker field on the issue.Any smart values starting with issue implies a field on the issue
{{object."Key-Owner".get(0).accountId}}
{{object."Key-Owner".accountId}}

Also loo at this community article and KB article.

Antonia
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.
October 21, 2025

Hi @Marc - Devoteam

Log action (it says nothing, but under create work item it says inactive user!?):

Screenshot 2025-10-21 154429.png

Is the "Key Owner" field an asset attribute or a custom field of type assets?

Unfortunately, I'm not quite sure what you mean, but maybe this screenshot will help:

Screenshot 2025-10-21 153837.png

 

Marc - Devoteam
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.
October 21, 2025

Hi @Antonia 

See the community post and article I added.

This article provides information as wel,, https://support.atlassian.com/jira/kb/how-to-auto-populate-approvers-from-asset-objects-attributes-using-automation-in-assets/ 

Also make sure the user executing this needs to have the correct permissions.

Browse Users and Groups global permission, this is a global permission in Jira, needs tp be granted to the rule actor.

Antonia
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.
October 22, 2025

Hello @Marc - Devoteam

thank you for your help.

Unfortunately, I'm not really getting anywhere. I've now put everything in the audit log to see if that helps at all. For the value

objecttype = ‘Employee’ and ”Jira user“ = {{reporter.accountId}}

So object type would be “Test Regel” for me, and do I also have to write “Reporter” or what goes there for me?

Is that the attribute where the user is listed?

{{lookupObjects.Manager.Jira user.accountId}}

Manager also appears here, but what kind of attribute is that?

I tried

objecttype = ‘Test Rule’ and “Jira user” = {{reporter.accountId}}

in the audit, but it was empty after “Jira User.”

 Which point is relevant for me? Because that's not exactly what I'm looking for, so I find it a bit difficult to get the information out of it.

 

Marc - Devoteam
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.
October 22, 2025

Hi @Antonia 

The key Owner attribute contain user objects that are users in Jira?

What is the object type where 

What do you get if you use this aql:

objecttype = "Test Regel" AND object HAVING outboundReferences ("Intune user" = "Key Owner")

 

Antonia
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.
October 22, 2025

Hi @Marc - Devoteam

The key Owner attribute contain user objects that are users in Jira?

the Key-Owner attribute contains an object type. This object type includes Jira users and email distribution lists. The object type for users is called “Intune User,” and I have now simply added the email distribution lists we need there.

What is the object type where 

So I have an object type called “Test Rule” where the rule should run. And in this object type, there is an attribute called “Key Owner,” which, however, references another object type, namely “Intune Users,” where the users are listed in Jira, and as I said, I added the email distribution lists there. But actually, the email distribution lists are just normal users, so it makes no difference.

What do you get if you use this aql:

objecttype = "Test Regel" AND object HAVING outboundReferences ("Intune user" = "Key Owner")


Screenshot 2025-10-22 154224.png
When I enter this as a smart value in the “Request Participants” or “Assignee” field, it does not recognize it as a smart value. Therefore, I cannot confirm this.

Marc - Devoteam
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.
October 22, 2025

No I mean not a log action, what is the result of the aql in assets or in a lookupobjects action in an automation rule

Antonia
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.
October 22, 2025

Sorry, so I tried it in a Lookup:

AQL "objecttype = "Test Regel" AND object HAVING outboundReferences ("Intune user" = "Key Owner") and objectSchemaId == 17" has invalid syntax at position 63 with error message "mismatched input '(' expecting {<EOF>, ' '}"

 So I tried this AQL:

objectType = "Test Regel" AND objectSchemaId = 17 AND "Intune User"."Key-Owner" IS NOT EMPTY

 But it says "No objects found"

Marc - Devoteam
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.
October 22, 2025

What if you use,

in an edit action the advanced option

{
"fields": {
"Assignee": {{"Test Rule" object.Key-Owner.flatten.asJsonObjectArray("id")}}
}
}

Antonia
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.
October 22, 2025

I can't add an “edit work item” action to my rule, even though it's a global automation and the trigger is “When: Scheduled.” Can't you mix actions in assets with actions in work items?

Marc - Devoteam
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.
October 22, 2025

Hi @Antonia 

No this is indeed not possible.

accountid's are not stored in assets, only the reference to an account.

You can try to use a web request action in your rule to get the account id based on email, if you have this set on users in assets

0 votes
Mikael Sandberg
Community Champion
October 21, 2025

In your person object, do you have a reference to the user's Atlassian account? You can do that by having an attribute that is of the user type.

Antonia
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.
October 21, 2025

We have a reference to the other object type, and it contains the user ID or email address, for example. Isn't that what I need? Because emails are also sent out and that works, but the assignee/request participant doesn't work.

Screenshot 2025-10-21 152859.png

Does it have to be a user attribute, or would an object attribute work as well?

Suggest an answer

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

Atlassian Community Events