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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.