Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page properties
hiddentrue
Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged

Page properties
hiddentrue
Short description

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

Output

Status
subtletrue
titlenumber

Available since

Status
subtletrue
colourRed
titleneeds lookup

UI Text Box
sizemedium
typeinfo

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.


Code Block
languagebash
titleSyntax
linenumberstrue
timeInStatus(statusName) #Output: Number


UI Expand
titleExamples


Expression parserDescription


Code Block
languagebash
linenumberstrue
timeInStatus("Open")


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


Code Block
languagebash
linenumberstrue
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.


Code Block
languagebash
linenumberstrue
timeInStatus(%{issue.status.previous}) / {MINUTE}


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



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
statusName

Status
subtletrue
titletext

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



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber




UI Text Box
sizemedium
typeinfo

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.


Code Block
languagebash
titleSyntax
linenumberstrue
timeInStatus(statusName, calendarName, timeZone) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
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.

UI Text Box
typeinfo
{HOUR} is a time macro used to convert the output to hours.




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
statusName

Status
subtletrue
titletext

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

Status
subtletrue
titletext

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

Status
subtletrue
titletimezone

The time zone used for the calculation. 



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber




UI Text Box
sizemedium
typeinfo

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

The time across all issues will be summed up.


Code Block
languagebash
titleSyntax
linenumberstrue
timeInStatus(statusName, issueList) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
timeInStatus("Open", subtasks()) / {HOUR}


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

UI Text Box
typeinfo

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

subtasks() is a function to return all subtasks.




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
statusName

Status
subtletrue
titletext

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

Status
subtletrue
titleissue list

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



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber




UI Text Box
sizemedium
typeinfo

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 summedup.


Code Block
languagebash
titleSyntax
linenumberstrue
timeInStatus(statusName, issueList, calendarName, timeZone) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
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.

UI Text Box
typeinfo

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

subtasks() is a function to return all subtasks.




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
statusName

Status
subtletrue
titletext

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

Status
subtletrue
titleissue list

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

Status
subtletrue
titletext

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

Status
subtletrue
titletimezone

The time zone used for the calculation. 



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber



Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_timeinstatus" and space = currentSpace()


Page properties
hiddentrue
id1


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




Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged



Page properties
hiddentrue


Short description

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

Output

Status
subtletrue
titlenumber

Available since

Status
subtletrue
colourRed
titleneeds lookup

Label

Status
colourRed
titlestaff pick