Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Auto fill number field based on date field

Sagi Gueta
Contributor
October 31, 2022

Hello,

I'm trying making automation (by Jira Automation App) that will set a value on number field based on:

Creation Date [minus] Closing Date

Yet I don't really know how should I make it. 

So far my idea was to make a smart value as shown in attached file, but ofc didn't work :(

What shall I do to make it work?

Closing Duration.JPG {{issue.created

1 answer

1 accepted

1 vote
Answer accepted
Florian Bonniec
Community Champion
October 31, 2022

Hi @Sagi Gueta 

You have to use diff function for that.

{{issue.closed.diff(issue.created).days}}

You can change the unit as you want, please check the documentation.

Documentation :

https://confluence.atlassian.com/automation/jira-smart-values-date-and-time-993924864.html

 

Regards 

Sagi Gueta
Contributor
October 31, 2022

Thanks for the tip, though I guess I did something wrong..

By the method you suggested to use, it should fill the field with number right? Unfortunately it didn't work when I did it.Automation.JPG Automation 2.JPG

Florian Bonniec
Community Champion
October 31, 2022

I think what you want is 

 

{{issue.resolved.diff(issue.created).days}}

closed will only work if you created the field. resolved is a system field that store the resolution date.

 

Regards

Like • Sagi Gueta likes this
Sagi Gueta
Contributor
November 3, 2022

Thanks alot it worked eventually!

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events