I am working with a company managed project in Jira Service Management (Cloud, premium).
In a global automation rule, I want to follow this process:
But it seems I can't use the {{object.id}} smart field as it throws an error.
Unable to render smart values when executing this rule:
Failed to get value for object.id: {{object.id}}
{{object}} returns the key of the asset (for example "DM-23") and the same goes for {{object.key}} or {{object.objectKey}}. Others like {{object.objectId}} throw the same error above.
The API call works OK if I enter the id manually, for example v1/object/23/history, but the issue is that I can't retrieve the triggering object ID to be able to use v1/object/{{object.id}}/history
.
Any ideas?
Thank you.
Hello @Enrique Sánchez
Welcome to the Atlassian community.
Names used in smart values can be case sensitive. For me, this works for getting the object ID following the Object trigger:
{{object.ID}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you provide a new screen image of the updated rule and the output in the Audit Log?
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.
Both lower case id and upper case ID work for me.
In the past I have seen rules exhibit strange behavior if they are edited too many times. Can you try creating the rule from scratch?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, that seemed to be the issue. When I created a new rule from scratch, the object.id started working.
I will leave here how the full rule ended up. I also needed to retrieve some object attributes so I added a second web request.
Thank you!
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.