Forums

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

Modyfing Insight / Assets values based on a Jira like Automation

Marco November 30, 2022

Hi community, 

we have an objecttype called "Contract" in our insight database. There are several attributes like "TerminationDate" and "Status". We would like to automate our infrastructure to regularily check all objects from type "Contract" and compare todays date with the attribute "TerminationDate". If "TerminationDate" is in the past, status should be switched to "Inactive" from whatever current state it was.

I thought to operate with jira automation and use "smart values" to get access to those insight information, but I've been thinking for a long time about the best way to do this and haven't found a way to do it at all.
I also tried via ScriptRunner to build a script in which I cppy & paste existing code snippets but found nothing suitable.
Do you have any idea how to solve this?

1 answer

1 vote
PD Sheehan
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.
December 6, 2022

You should be able to do this with the native Insight Automation.

Create a new automation rule and in "When", select "Scheduled Event".

Specify a CRON expression to execute daily or weekly or whenever.

In the IQL Condition, add something like:

objectType=Contract and "TerminationDate" < startOfDay() and Status != Inactive

The the "Then" block, add an "Attribute Value" action and specify that you want to change the Status to Inactive.

Suggest an answer

Log in or Sign up to answer