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:
The field where the people are listed is an object field containing the users imported from Intune.
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.
Log action (it says nothing, but under create work item it says inactive user!?):
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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")
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What if you use,
in an edit action the advanced option
{
"fields": {
"Assignee": {{"Test Rule" object.Key-Owner.flatten.asJsonObjectArray("id")}}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Does it have to be a user attribute, or would an object attribute work as well?
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.