Versions Compared

Key

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


UI Text Box
sizemedium
typeinfo

This function returns the time a text field has had a specific value

The field's value in referenced with %{seed.text} in the logical condition. 


Code Block
languagebash
titleSyntax
linenumberstrue
timeInValue(textField, condition) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
timeInValue(%{issue.summary}, %{seed.text} ~~ "ERROR" OR %{seed.text} ~~ "WARNING") / {HOUR}


This example returns the number of hours the field summary of the current issue contained any of the words "ERROR" or "WARNING", ignoring the case.

UI Text Box
typeinfo

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



Code Block
languagebash
linenumberstrue
timeInValue(%{issue.components}, count(toStringList(%{seed.text}, ",")) > 1) / {HOUR}


This example returns the number of hours the field components of the current issue contained more than one selected component.

UI Text Box
typeinfo

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

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
timeInValue(%{issue.priority}, %{seed.text} in ["Critical", "High"]) / {HOUR}


This example returns the number of hours the field priority of the current issue had a value of Critical or High.

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
textField

Status
subtletrue
titletext

The input has to be a valid text field represented by a field code.
condition

Status
subtletrue
titletext

The calculation will only be performed if the logical condition is being met.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber




UI Text Box
sizemedium
typeinfo

Variant for number or date-time fields.


Code Block
languagebash
titleSyntax
linenumberstrue
timeInValue(numberField, condition) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
timeInValue({issue.dueDate}, {seed.number} != null) / {HOUR}


This example returns the number of hours the field Due date of the current issue had a value.


Code Block
languagebash
linenumberstrue
timeInValue({issue.cf10001}, {seed.number} >= 5 AND {seed.number} <= 10)


This example returns the number of milliseconds of a numeric field called Passengers (field code {10001}) of the current issue that remained between 5 and 10.


Code Block
languagebash
linenumberstrue
timeInValue({issue.cf10001}, modulus({seed.number}, 2) = 0)


This example returns the number of milliseconds of a numeric field called Passengers (field code {10001}) of the current issue that had an even value (2, 4, 6,...).

To achieve this, the following functions are used:

UI Text Box
typetip

Additional useful functions can be found here: Numbers




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
numberField

Status
subtletrue
titletext

The input has to be a valid number field represented by a field code.
condition

Status
subtletrue
titletext

The calculation will only be performed if the logical condition is being met.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber




UI Text Box
sizemedium
typeinfo

Variant for text fields where you can additional specify an issue list instead taking the field from the current issue. The function returns the sum of milliseconds of each issue in the given list.


Code Block
languagebash
titleSyntax
linenumberstrue
timeInValue(textField, issueList, condition) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
titleSyntax
linenumberstrue
timeInValue(%{issue.summary}, subtasks(), %{seed.text} ~~ "ERROR" OR %{seed.text} ~~ "WARNING") / {MINUTE}


This example returns the number of minutes the sub-tasks' summaries contained any of the words "ERROR" or "WARNING" ignoring the case.

To achieve this, the following functions are used:


Code Block
languagebash
titleSyntax
linenumberstrue
timeInValue(%{issue.components}, epic(), count(toStringList(%{seed.text}, ",")) > 1)


This example returns the number of milliseconds the epic's field components contained more than one selected component.

To achieve this, the following functions are used:


Code Block
languagebash
titleSyntax
linenumberstrue
timeInValue(%{issue.priority}, filterByIssueType(linkedIssues(), "Bug, New Feature"), %{seed.text} in ["Critical", "High"]) / {HOUR}


This example returns the number of hours the linked Bugs and New features had a priority of Critical or High.

To achieve this, the following functions are used:



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
textField

Status
subtletrue
titletext

Any given text field.
issueList

Status
subtletrue
titleIssue list

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).

condition

Status
subtletrue
titletext

The calculation will only be performed if the logical condition is being met.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber




UI Text Box
sizemedium
typeinfo

Variant of number or date-time fields.


Code Block
languagebash
titleSyntax
linenumberstrue
timeInValue(numberField, issueList, condition) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
timeInValue({issue.dueDate}, subtasks(), {seed.number} != null


This example returns the number of milliseconds the sub-tasks' Due Date field had a value.

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
timeInValue({issue.cf10001}, epic(), {seed.number} >= 5 AND {seed.number} <= 10)


This example returns the number of milliseconds the epic's numeric field Passengers had a value between 5 and 10.

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
timeInValue({issue.cf10001}, filterByIssueType(linkedIssues(), "Bug, New Feature"), modulus({seed.number}, 2) = 0)


This example returns the number of milliseconds the linked Bugs' and New features' numeric field Passengers had an even value.

To achieve this, the following functions are used:

UI Text Box
typetip

Additional useful functions can be found here: Numbers




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
numberField

Status
subtletrue
titletext

Any given number field.
issueList

Status
subtletrue
titleissue list

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).

condition

Status
subtletrue
titletext

The calculation will only be performed if the boolean condition is being met.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber




UI Text Box
sizemedium
typeinfo

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

The field's value in referenced with ^% in the boolean condition. 


Code Block
languagebash
titleSyntax
linenumberstrue
timeInValue(textField, condition, calendar, timeZone) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
timeInValue(%{issue.components}, count(toStringList(%{seed.text}, ",")) > 1, "my_calendar", LOCAL) 


This example returns the number of milliseconds the field components of the current issue contained more than one selected component, within a calendar named "my_calendar" in the server's default time zone.

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
timeInValue(%{issue.priority}, %{seed.text} in ["Critical", "High"], "my_calendar", LOCAL)


The function returns the number of milliseconds the current issue had a priority of Critical or High, within a calendar named "my_calendar" in the server's default time zone.


Code Block
languagebash
linenumberstrue
timeInValue(%{issue.summary}, %{seed.text} ~~ "ERROR" OR %{seed.text} ~~ "WARNING", "my_calendar", LOCAL)


The function returns the number of milliseconds the field summary of the current issue contained any of the words "ERROR" or "WARNING", ignoring the case, within a calendar named "my_calendar" in the server's default time zone.



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
textField

Status
subtletrue
titletext

Any given text field.
condition

Status
subtletrue
titletext

The calculation will only be performed if the boolean condition is being met.

calendar

Status
subtletrue
titletext

A valid calendar name.
timeZone

Status
subtletrue
titletimezone

The time zone used for the calculation. 


UI Text Box
typetip

Work days might depend on the time zone - it might be Sunday on the west coast of the US while at the same time it's already Monday in Australia. 



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber




UI Text Box
sizemedium
typeinfo

Variant of number or date-time fields.


Code Block
languagebash
titleSyntax
linenumberstrue
timeInValue(numberField, condition, calendar, timeZone) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
timeInValue({issue.dueDate}, {seed.number} != null, "my_calendar", LOCAL)


This example returns the number of milliseconds the field Due Date of the current issue had a value, within a calendar named "my_calendar" in the server's default time zone.


Code Block
languagebash
linenumberstrue
timeInValue({issue.cf10001}, {seed.number} >= 5 AND {seed.number} <= 10, "my_calendar", LOCAL)


This example returns the number of milliseconds the numeric field Passengers of the current issue had a value between 5 and 10, within a calendar named "my_calendar" in the server's default time zone.


Code Block
languagebash
linenumberstrue
timeInValue({issue.cf10001}, modulus({seed.number}, 2) = 0, "my_calendar", LOCAL)


This example returns the number of milliseconds the numeric field Passengers in current issue had an even value, within a calendar named "my_calendar" in the server's default time zone.

To achieve this, the following functions are used:

UI Text Box
typetip

Additional useful functions can be found here: Numbers




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
numberField

Status
subtletrue
titletext

Any given number field.
condition

Status
subtletrue
titletext

The calculation will only be performed if the boolean condition is being met.
calendar

Status
subtletrue
titletext

A valid calendar name.
timeZone

Status
subtletrue
titletimezone

The time zone used for the calculation. 


UI Text Box
typetip

Work days might depend on the time zone - it might be Sunday on the west coast of the US while at the same time it's already Monday in Australia. 



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber




UI Text Box
sizemedium
typeinfo

Variant where you can additionally specify an issue list.


Code Block
languagebash
titleSyntax
linenumberstrue
timeInValue(textField, issueList, condition, calendar, timeZone) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
timeInValue(%{issue.summary}, subtasks(), %{seed.text} ~~ "ERROR" OR %{seed.text} ~~ "WARNING", "my_calendar", LOCAL)


This example returns the sum of milliseconds the sub-tasks' fields summary contained any of the words "ERROR" or "WARNING", ignoring the case, within a calendar named "my_calendar" in the server's default time zone.

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
timeInValue(%{issue.components}, epic(), count(toStringList(%{seed.text}, ",")) > 1, "my_calendar", LOCAL)


This example returns the number of milliseconds the epic's field components contained more than one selected component, within a calendar named "my_calendar" in the server's default time zone.

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
timeInValue(%{issue.priority}, filterByIssueType(linkedIssues(), "Bug, New Feature"), %{seed.text} in ["Critical", "High"], "my_calendar", LOCAL)


This example returns the sum of milliseconds the linked Bugs' and New Features' field priority had a value of Critical or High, within a calendar named "my_calendar" in the server's default time zone

To achieve this, the following functions are used:



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
textField

Status
subtletrue
titletext

Any given text field.
issueList

Status
subtletrue
titleissue list

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).
condition

Status
subtletrue
titletext

The calculation will only be performed if the boolean condition is being met.
calendar

Status
subtletrue
titletext

A valid calendar name.
timeZone

Status
subtletrue
titletimezone

The time zone used for the calculation. 


UI Text Box
typetip

Work days might depend on the time zone - it might be Sunday on the west coast of the US while at the same time it's already Monday in Australia. 



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber




UI Text Box
sizemedium
typeinfo

Variant with number or date-time fields.


Code Block
languagebash
titleSyntax
linenumberstrue
timeInValue(numberField, issueList, condition, calendar, timeZone) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
timeInValue({issue.dueDate}, subtasks(), {seed.number} != null, "my_calendar", LOCAL)


This example returns the sum of milliseconds the sub-tasks' fields Due date had a value, within a calendar named "my_calendar" in the server's default time zone

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
timeInValue({issue.cf10001}, epic(), {seed.number} >= 5 AND {seed.number} <= 10, "my_calendar", LOCAL)


This example returns the number of milliseconds the epic's field Passengers had a value between 5 and 10, within a calendar named "my_calendar" in the server's default time zone

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
timeInValue({issue.cf10001}, filterByIssueType(linkedIssues(), "Bug, New Feature"), modulus({seed.number}, 2) = 0, "my_calendar", LOCAL)


This example returns the sum of milliseconds the linked Epics' and New Features' numeric field Passengers had an even value, within a calendar named "my_calendar" in the server's default time zone

To achieve this, the following functions are used:

UI Text Box
typetip

Additional useful functions can be found here: Numbers




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
numberField

Status
subtletrue
titletext

Any given number field.
issueList

Status
subtletrue
titleissue list

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).
condition

Status
subtletrue
titletext

The calculation will only be performed if the boolean condition is being met.
calendar

Status
subtletrue
titletext

A valid calendar name.
timeZone

Status
subtletrue
titletimezone

The time zone used for the calculation. 


UI Text Box
typetip

Work days might depend on the time zone - it might be Sunday on the west coast of the US while at the same time it's already Monday in Australia. 



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber



Use cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_timeinvalue" 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 an issue field has had a specific value.

Output

Status
subtletrue
titlenumber

Available since

Status
subtletrue
colourRed
titleneeds lookup

Label

Status
colourRed
titlestaff pick