Hi,
I tried to solve my problem in 2 methods, but none of them works for me.
Problem definition:
Based on Start Date and Remaining Estimate fill value for End Date using only bussiness days for calculation.
Start Date and End Date - are custom fields in my jira, i know IDs of those two.
I stuck on reading date and translating it to number value to do math in smart value automation.
I tried this:
Edit Issue (action)
modify field - End Date:
formula:
{{#=}}{{issue.field.customField_ID(start_date)}} + ( {{issue.timetracking.timeSpentSeconds}} / 28800)}} ){{/}}
or:
Edit Issue (action)
modify field - Start Date:
set: {{now.toBusinessDay()}}
modify field - End Date:
formula:
{{now.plusDays({{issue.timetracking.timeSpentDays}}).toBusinessDay()}}
Is anyone here who can solve that issue for me ?
Regards
Luke
Hi @lukasz_skurczynski -- Welcome to the Atlassian Community!
First thing, is "End Date" a custom field or do you instead mean the "Due date" field?
You are on the correct path with your second example: to increment a date value, use the plus functions in a rule: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-plus-unit---
The values passed to the functions like plusDays() must be a number, so first confirm you have your values correct by writing them to the audit log.
For your specific scenario, you do not describe under what conditions you will use the Remaining Estimate to increment the Start date value. This is relevant as the remaining will decrease over time, and so pick a "baseline" point.
You also do not state if the final value of "End Date" should be a business day. (The increments could make it fall on a weekend.) If it needs to be a business day, add the toBusinessDay function to do so. https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Next-business-day---
{{issue.Start date.plusBusinessDays(issue.timetracking.remainingEstimateSeconds.divide(28800)).toBusinessDay}}
Kind regards,
Bill
Thank you for quick reply !
function works as intended.
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.