How to trigger an automation rule based on a specific service account

serge calderara
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 8, 2024

Dear all,

We have actually different automation rule which are executed with a Jira internal account named "Automation" as actor.
Actor as defined represent the account which execute the define rule.

 

Now our business case is as follow :

We have external apps which call Jira rest API to update Jira Issue.

The we have an automation rule which trigger on "Issue Update"

We need to trig that automation rule only from internal Jira but not when the issue is updated from the API.

Is there a way to identify, which user update the issue, in order to add that check in the rule trigger as bellow :

If user account is from REST API update, then stop rule execution

Any idea how to get that account info from the rule ?

regards

1 answer

1 accepted

2 votes
Answer accepted
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 8, 2024

Hi @serge calderara 

You could look at creating a variable

You might want to use a smart value like; [~accountid:{{initiator.accountId}}]

Compare this to the API related user,

If that doesn't equal the API user (as it should have an account in Jira, as access in Jira is API token based), then the rule should do all the action in the rule.

If the actor does match the user, the rule will stop.

serge calderara
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 8, 2024

@Marc - Devoteam thanks for your reply.

can't it be done by adding a user condition with "user who trigger the event" ?

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 8, 2024

Hi @serge calderara 

You could try this option to see.

You could also use a log action before to help on this to see if the initiator gets logged.

Suggest an answer

Log in or Sign up to answer