Hi everyone,
can you help me with this one please?
I have a custom field Asset - start date, custom field Depreciation period which shows number of years of depreciation and then I have a custom field Asset - end date planned where I need the result of Asset - start date plus number of years in field Depreciation period.
Is that possible?
Many thanks!
Lenka
I guess your choice would be
{{[date].plus[Unit]([number])}}
See the documentation:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
Please let me know if there are any further questions.
Best
Stefan
Hi Stefan,
thanks for your answer.
I am currently using this formula: {{issue.Asset - start date.plusYears(4)}}
But this is applicable only for the task where the Depreciation period is 4. But it can be a different number for every task. That is why I am looking for a solution that will add the value in the field Depreciation period to the field Asset - start date.
Something like this (I know it is not correct):
{{issue.Asset - start date}} + {{issue.Depreciation period}}
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could also use the value of your "Deprication period" use as the number in the brackets. Try following:
{{issue.Asset - start date.plusYears(issue.Deprication period)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just tested the following automation rule in my system.
I just filled in Real start and years of usage --> Expected End Date was calculated and filled in by the automation rule (--> see screenshot)
Hope this helps.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much, Stefan!
I tried so many variations of this formula but was not able to find the right one. This finally works! :)
I just need to apply it also on changes in field Depreciation period and it is done.
Thanks again!
Lenka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
AWESOME!!! You are welcome.
Good to hear it works :)
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
I also need the same thing but for only business days.
Like I have custom field name Start Date (Date) and Duration(Number).
I want to get the value in Due date = Start date + Duration
But only for business days in due date custom field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Amit Shaw
Please try using the toBusinessDay function for that: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
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.
Hi Stefan,
I am trying
{{object.Last Periodic Review Date.plusYears(object.Review Frequency).format("MM/dd/yyyy")}}
but its returning null. I have checked that Review Frequency is Int type.
Any suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is an old solved post. And as it uses „object“ in the smart value I assume it‘s Jira Service Management.
Please consider opening a new thread describing your whole use case as well as providing screenshots of your rule.
Please also put some log actions in your rule and check all the entities one by one if the work on there own (for testing/denugging reasons).
Don‘t hesitate to tag me in this new post.
Thanks in advance.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.