Date manipulation scenario

Rob Sirard May 13, 2019

I am trying to calculate an Estimated Delivery Date based on a Planned Start Date and a team's weekly Throughput.  I put the smart-value formula below and it does not work.

{{issue.Planned Start Date.plusdays(7/{{issue.Throughput}})}}

If I remove the Throughput part and just have and hard-coded value it does not work either.

{{issue.Planned Start Date.plusdays(7/1)}}

 

So I can conclude plusdays can only take a single value as a parameter.  Is there any way to accomplish what I am trying to do?

3 answers

2 votes
Ansar Rezaei
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.
June 24, 2020

I have the same issue. Did you have any other workaround to add the original estimate to the Start date to calculate the End date?

0 votes
Ansar Rezaei
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.
June 24, 2020

+1

0 votes
Victor Seger
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.
May 14, 2019

Hi Robert,

You are correct, as the "plusdays" function doesn't allow more than one value as parameter.

To help us figure out what might be going on. Can you send through screenshots of:

# the rule you're having issues with
# the audit log of the result of the rule

Also, can you please tell us more about the Throughput field. Is it a date type field or is it a number type field?

Thanks,

Victor

Rob Sirard May 14, 2019

Throughput is a number field.  I tried just putting the field (that represents a number) as the parameter to plusdays and that did not work either.  So it looks like plusdays can only take an actual number as a valid parameter?

Error:

Edit issue

Error rendering smart-values when executing this rule:Failed to get value for issue.Planned Start Date.plusdays({{issue.Throughput: {{issue.Planned Start Date.plusdays({{issue.Throughput}})}}

Victor Seger
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.
May 14, 2019

Robert,

Thank you for your reply.

It is not currently possible to add math formulas into the plusdays function, as it only accepts numbers as parameters.

We raised a ticket for this enhancement (AUT-1473). This effectively counts as a vote for this issue. You'll get notified on this support ticket when the issue has been resolved and released to server and cloud. (Due to a [bug in Jira Service Desk|https://jira.atlassian.com/browse/JSDSERVER-1367] you might need to open the linked issue in an incognito window to see it).

Cheers,

Victor

JJ October 9, 2020

What function do you recommend in its place since plusdays doesn't accept variables? This is what I'm trying to do... https://community.atlassian.com/t5/Jira-Software-questions/plusdays-function-not-working-when-I-pass-in-a-variable/qaq-p/1500605?utm_source=atlcomm&utm_medium=email&utm_campaign=accept_as_solution_reminder&utm_content=topic

Can you recommend a solution?

Thanks!

MA February 8, 2021

Hi Victor,

I would also like to vote for this also, as I have just spent about 4 hours learning smart-values so that I can add business days to a date field only to find out that it only seems to be able to accept a hard coded value in the automation.  Is this correct?  If it is, I am struggling to think of any real world scenario when this would be useful.  In all examples that I can think on, I want to calculate the days to add based on other fields or some other logic.  Am I missing something?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events