Adding a Numerical Custom field to a Due Date using smart values

John Haworth April 14, 2023

Hi

We have a 3rd part provider who provides estimated for work. These estimated exclude business days. We have to update the due date on planned work a lot in jira roadmaps which creates a lot of overhead and admin when the plan changes

The logic I'm trying to create is 

 

Sprint start date + Size + Business days = Sprint Due date

Size is a custom numerical field, {{issue.fields.customfield_11714}} 

 

I've tried the new syntax 

{{Issue.Sprint.startDate.jiraDate.plusBusinessDays(6)}}

This works when there is a static value in ()

 

However I cant get this to work when there is a variable 

{{Issue.Sprint.startDate.jiraDate.plusBusinessDays(issue.fields.customfield_11714)}}

I've also tried the above where customfield_11714 is created as a variable 

I found this article with a work around using an old syntax but the solution no longer appears to work 

{{#issue.field}}func=plusBusinessDays({{yourVariable|numeric field}}){{/}}

 

I'm now down to creating this as the mother of all if statements setting the date using static values based looking up using jira automation 

IF Size =1 {{Issue.Sprint.startDate.jiraDate.plusBusinessDays(1)}}

IF Size =2 {{Issue.Sprint.startDate.jiraDate.plusBusinessDays(2)}} 

etc. But this is obviously ugly as sin. Has anyone got a nicer solution?

 

 

 

1 answer

0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 14, 2023

Hi John, I can't get to where I can test out some automation at the moment. However, I'm wondering if the following might work.

create a variable action component, e.g.

size = {{issue.customfield_11714}}

then use the variable in your smartvalue statement 

{{Issue.Sprint.startDate.jiraDate.plusBusinessDays(issue.fields.size)}}

John Haworth April 17, 2023

Hi Jack 

I'm afraid not, I tried this,(probably wasn't clear enough in my explanation)

I've also tried the above where customfield_11714 is created as a variable 

Where the static version returns a date, this just blanks the value in the field its being returned to 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events