Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Date calculation in Jira Structure formula

I am trying to create a Jira Structure Formula field that tells me if a date in a custom field is older than 30 days from today. 

I can get today's serial number and add 30 days of seconds to it, but when I try to take this little formula (today()+2592000) and use it anywhere else, it doesn't work as expected. I can do this:  format_datetime((today()+2592000),"dd-MM-yy") and it gives me today's date.  Taking out the addition gives the same result.

I have tried a number of different formulas and ways to break it down, with no luck.

Any ideas?

 

 

 

1 answer

2 votes
David Niro
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 04, 2022 • edited

Hello @Mary M ,

David from ALM Works here.

For this, it is going to depend on what custom field you are using.  If you are using a Date Picker custom field, it will be as I describe below.  If you are using some other custom field type, or a custom field coming from another app, please let me know what that field is / where it comes from.

If using a Date Picker custom field, we will want to use the DAYS_BETWEEN function, defining your custom field and today(), then compare the "days between" to the 30 day threshold you have set.

It will look something like this:

IF DAYS_BETWEEN(today(),DatePicker)>30: 
"oh no"

You can change the "oh no" to match whatever text you would like to display.  

I should also mention that the formatting of the formula will depend on which version of Structure you are currently on.   This format works with 7.0 and higher.  You can determine which version of Structure you are on by clicking on the info button in the bottom right corner of your structure.

Please let me know if this helps.

Best,
David

 @David Niro  would your suggestion also work With the Jira “updated” field ? 
(The field registers the date &time of the last change/update to the issue)

meaning

 

IF DAYS_BETWEEN(today(),Updated)>”xxx”

Number of days since last update of a  e.g. Epic.

 

thanks

Like David Niro likes this
David Niro
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 05, 2023

Hello @Alex Agn ,

Yes, it works with the updated field.  You would want to switch the updated and today() variables though.

Best,
David

Hi @David Niro , Is there a way to compare 2 dates of different issuetypes linked in formula in structure

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events