This function returns the number of milliseconds the current issue has remained in a status with specific status.

If an issue has been in that status more than once, then duration will be summed up and the total time spent in the status will be returned.


timeInStatus(statusName) #Output: Number



Expression parserDescription


timeInStatus("Open")


This example returns the number of milliseconds the current issue has stayed in status "Open"


timeInStatus("Open") / {HOUR}


This example returns the number of hours the current issue has stayed in status "Open"

{HOUR} is a time macro used to convert the output to hours.


timeInStatus(%{issue.status.previous}) / {MINUTE}


This example returns the number of minutes the current issue has stayed in previous status.



Parameters used in this function

ParameterInput (data type)Description
statusName

The input has to be a valid status name. Alternatively you can use field codes to retrieve the value.



This function returns a




Variant where you additionally define a custom calendar and time zone.

If an issue has been in that status more than once, then duration will be summed up and the total time spent in the status will be returned.


timeInStatus(statusName, calendarName, timeZone) #Output: Number



Parser expressionDescription


timeInStatus("Open", "my_schedule", LOCAL) / {HOUR}


This example returns the number of hours the current issue has stayed in status "Open" within the schedule called "my_schedule" matching the server's default time zone.

{HOUR} is a time macro used to convert the output to hours.




Parameters used in this function

ParameterInput (data type)Description
statusName

The input has to be a valid status name. Alternatively you can use field codes to retrieve the value.
calendarName

The input has to be a valid calendar name. Learn more about working with calendars.
timeZone

The time zone used for the calculation. 



This function returns a




Variant where you can additionally define multiple issues in an issue list.

The time across all issues will be summed up.


timeInStatus(statusName, issueList) #Output: Number



Parser expressionDescription


timeInStatus("Open", subtasks()) / {HOUR}


This example returns the number of hours the current issue's sub-tasks have stayed in status "Open"

{HOUR} is a time macro used to convert the output to hours.

subtasks() is a function to return all subtasks.




Parameters used in this function

ParameterInput (data type)Description
statusName

The input has to be a valid status name. Alternatively you can use field codes to retrieve the value.
issueList

The input has to be a valid issue list. Learn more about Lists.



This function returns a




Variant where you can define multiple issues in an issue list and additionally a custom calendar and time zone.

The time across all issues will be summed up.


timeInStatus(statusName, issueList, calendarName, timeZone) #Output: Number



Parser expressionDescription


timeInStatus("Open", subtasks(), "my_schedule", LOCAL) / {HOUR}


This example returns the number of hours  the current issue's sub-tasks have stayed in status "Open" within the schedule called "my_schedule" matching the server's default timeZone.

{HOUR} is a time macro used to convert the output to hours.

subtasks() is a function to return all subtasks.




Parameters used in this function

ParameterInput (data type)Description
statusName

The input has to be a valid status name. Alternatively you can use field codes to retrieve the value.
issueList

The input has to be a valid issue list. Learn more about working with lists.
calendarName

The input has to be a valid calendar name. Learn more about working with calendars.
timeZone

The time zone used for the calculation. 



This function returns a



Use cases and examples



Parser function cloud
Map(error)
NotesNot possible because that kind of information is not available.






Status
Tech review

Style guide




Short description

Returns the time the current issue has remained in a specific status.

Output

Available since

Label