Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

AQL Syntax for "changed"

Jeffrey Eaton November 8, 2023

Hi All,

Schema = Users
ObjectType = Users
Attribute = Account Status
Selections = Active, Inactive

Looking for assistance, I'm trying to create an automation rule that looks at an account's status and if it has gone FROM Inactive TO Active - then email etc etc.

I cannot get the if AQL to accept obviously "Account Status" FROM "Inactive" TO  "Active" etc.. Just wondering if there is anything else I could do?

 

1 answer

1 vote
Murat Seven
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.
November 8, 2023

Hi @Jeffrey Eaton and ,thanks for your question.

From your question, I understand you're changing account Status from Inactive to Active. But i wonder, are you making the change on the account Status field in the Asset or issue field (asset custom field)?

 

Best,

Murat Seven

Jeffrey Eaton November 8, 2023

All assets based :)

So I have a user schema which has an account status of active or inactive. I want to trigger an email when an account goes from inactive to active so I can check some things.

I can do a simple if "account status" = Active but the issue with that is, any time the user asset is changed, if the status remains active but let's say another attribute is updated, I still get the email..

 

I need something that works with a FROM and to a TO aspect.

Murat Seven
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.
November 9, 2023

Hi @Jeffrey Eaton and thank you for your response.


After a few attempts, I realized that the requested task couldn't be accomplished exactly as you wanted. You can find more details about the usage of AQL syntax.

In the screenshot below, I prepared an automation that sends an email when the "status"( corresponding to your "Account Status") attribute is changed in the asset table. I added a condition that when the status attribute is changed in the "People" table (corresponding to your "Users").

However, if a attribute other than 'status' is changed in the People table (and the status field is either 'active' or 'inactive'), the automation still runs successfully and sends an email.

 

Screen Shot 2023-11-09 at 2.05.03 PM.pngScreen Shot 2023-11-09 at 2.04.48 PM.pngScreen Shot 2023-11-09 at 2.03.20 PM.pngScreen Shot 2023-11-09 at 2.02.19 PM.pngScreen Shot 2023-11-09 at 2.02.10 PM.png 

Hope this helps. If the issue is resolved, you can vote and accepted for this comment.

 

Best,

Murat Seven

Jeffrey Eaton November 15, 2023

Hi Muart, Thanks for you help, sadly it doesn't quite cut it though as I run a script every morning that updates the people schema. 

Based on the above from your comments, if an object is updated, let's say with job title change, phone number change or a line manager change, that email would still run, is that right? 

In this instance, I'd get about 100 emails a day compared to the 3-4 that I should really get haha. :)

Murat Seven
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.
November 15, 2023

Hi @Jeffrey Eaton  and thank you for reply.

 

Yes, you're right. If there are many changes in your scenario, you will receive many emails :)

As far as I know, we cannot exactly provide the situation you're asking for.

Suggest an answer

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

Atlassian Community Events