TLDR; I want to use an object attribute (X months) to calculate a new date and update another attribute with that date (as part of an automation).
Scenario
I have a list of systems/tools that need to go through user access audits periodically. Each system is registered as an object in Assets and in Jira I have a space where I track the status of these audits. Each issue is linked to a system via a object custom field.
Current setup
In my current setup I have an attribute for "Last audit date" which is updated via automation when the corresponding Jira issue is closed. To do this I use the Edit Assets field attributes action and update the Last audit date attribute with {{Today()}} smart value. This works like a charm.
What I'm trying to achieve
I want to add a second object attribute for Next audit date which should also be updated when the issue is closed, but filled with a date in the future. To achieve this I have a third attribute for "Audit frequency" and I want to use that to calculate the Next audit date.
My problem is that I can't get the Next audit date calculation to work. I've tried so many variations of date smart values, attribute placeholder and so on.
Has anyone done anything like this? Is there a common pit-fall that I'm missing?
Welcome to the community.
I have tried this by setting this in a variable, but you can't use variables a smart clause on setting a asset attribute value.
What you can do is using date smart values.
So as example you could set an attribute of a found object with: {{now.plusMonths(12)}}
The value between () can be specified using a variable, I tried this, but then it doesn't work.
Hi @Albert Hauksson -- Welcome to the Atlassian Community!
FYI the today() function is undocumented, and appears to return the date only (presumably in UTC). Even though the { } smart value "helper" shows that function in a few places, I hypothesize that is a mistake from a person typing in the text. Rather than using undocumented features, I recommend using the now function, as described by @Marc -Devoteam-
To use a variable (or text value) as a parameter to the inline date / time functions which take an integer, it must be converted using asNumber first. I believe this only works if the text value is an integer and does not contain a decimal point, scientific notation, commas, etc.
The alternative is to use the long / section format of the date / time functions and the text will automagically convert to a number.
Kind regards,
Bill
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.