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. 


timeInValue(textField, condition) #Output: Number



Parser expressionDescription


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.

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



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.

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

To achieve this, the following functions are used:


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.

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




Parameters used in this function

ParameterInput (data type)Description
textField

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

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



This function returns a




Variant for number or date-time fields.


timeInValue(numberField, condition) #Output: Number



Parser expressionDescription


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.


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.


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:

Additional useful functions can be found here: Numbers




Parameters used in this function

ParameterInput (data type)Description
numberField

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

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



This function returns a




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.


timeInValue(textField, issueList, condition) #Output: Number



Parser expressionDescription


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:


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:


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:



Parameters used in this function

ParameterInput (data type)Description
textField

Any given text field.
issueList

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

condition

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



This function returns a




Variant of number or date-time fields.


timeInValue(numberField, issueList, condition) #Output: Number



Parser expressionDescription


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:


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:


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:

Additional useful functions can be found here: Numbers




Parameters used in this function

ParameterInput (data type)Description
numberField

Any given number field.
issueList

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

condition

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



This function returns a




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

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


timeInValue(textField, condition, calendar, timeZone) #Output: Number



Parser expressionDescription


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:


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.


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.



Parameters used in this function

ParameterInput (data type)Description
textField

Any given text field.
condition

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

calendar

A valid calendar name.
timeZone

The time zone used for the calculation. 


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. 



This function returns a




Variant of number or date-time fields.


timeInValue(numberField, condition, calendar, timeZone) #Output: Number



Parser expressionDescription


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.


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.


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:

Additional useful functions can be found here: Numbers




Parameters used in this function

ParameterInput (data type)Description
numberField

Any given number field.
condition

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

A valid calendar name.
timeZone

The time zone used for the calculation. 


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. 



This function returns a




Variant where you can additionally specify an issue list.


timeInValue(textField, issueList, condition, calendar, timeZone) #Output: Number



Parser expressionDescription


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:


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:


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:



Parameters used in this function

ParameterInput (data type)Description
textField

Any given text field.
issueList

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

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

A valid calendar name.
timeZone

The time zone used for the calculation. 


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. 



This function returns a




Variant with number or date-time fields.


timeInValue(numberField, issueList, condition, calendar, timeZone) #Output: Number



Parser expressionDescription


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:


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:


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:

Additional useful functions can be found here: Numbers




Parameters used in this function

ParameterInput (data type)Description
numberField

Any given number field.
issueList

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

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

A valid calendar name.
timeZone

The time zone used for the calculation. 


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. 



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 an issue field has had a specific value.

Output

Available since

Label