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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,878
Community Members
 
Community Events
176
Community Groups

Calculated Date-Time Field (by JWT) timeInStatus("Custom_Status") not calculating correctly

Hi,

I need to get issues' duration in certain status.

For example, Custom Status is "Planning" (type=Calculated Date-Time Field (by JWT)), and I need to get how long the issue has been in this status (preferably in Days).

Setup: 

Expression: timeInStatus("Planning")

Display format: 

   Format type=Custom format

   Custom date-time format=D

For many of the issues I get the right duration. But for some issues the duration is not correct, and I can't figure out, why. 

I have three this kind of field, and there are cases where 2 of them are correct and one of the three is wrong.

Also tried Custom field type Calculated Number Field (by JWT) and this counts duration correctly on every issue, but the display format is a bit uncomfortable to use for us.

Any idea why Date-Time type duration count is unstable?

Jira Server v8.13.17

1 answer

1 accepted

2 votes
Answer accepted

Hi @Helena

You have to use a Calculated Number Field field for displaying the number of days, which is indeed a duration. A Calculated Date-Time field can only be used for displaying a moment in time, but neither a number of days or a duration.

If you don't like the default format for duration provided by de Calculated Number Fields, and prefer simply the number of days, you can use the following expression and display format:

EXPRESSION:

floor(timeInStatus("Planning") / (24 * {HOUR}))

CUSTOM DISPLAY FORMAT:

### days

Like shown in the following screenshot:

calculated_field.png

Regards,

Fidel

@Fidel Castro Thank You! Calculated Number with your guidance works just how we need.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events