Status
Tech review

Style guide




Short description

Returns the time an issue field has had a specific value.

Output

Available since




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

The value check (a boolean condition) is being initialized with ^%. 


timeInValue(textField, condition) #Output: Number



Parser expressionDescription


timeInValue(%{issue.summary}, ^% ~~ "ERROR" OR ^% ~~ "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(^%, ",")) > 1) / {HOUR}


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

This example uses these functions:

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



timeInValue(%{issue.priority}, ^% 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 boolean condition is being met.



The function returns a




The function returns the  of milliseconds of a number or date-time field with code {nnnnn} of the current issue that has a value satisfying a boolean expression predicate.

Where the string value of the field with code {nnnnn} is represented by ^.


timeInValue(number field field, boolean expression predicate) #Output: Number



Parser expressionDescription


timeInValue({00012}, ^ != null)


The function returns the  of milliseconds of the field Due date (field code {00012}) of the current issue that had a value.


timeInValue({10001}, ^ >= 5 AND ^ <= 10)


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


timeInValue({10001}, modulus(^, 2) = 0)


The function returns the  of milliseconds of a hypothetical numeric field called Passengers (field code {10001}) of the current issue that has an even value (2, 4, 6,...).



Parameters used in this function

ParameterInput (data type)Description
<parameter>

Parameter description.
<parameter>

Parameter description.



The function returns a




The function returns a representing the sum of milliseconds of a string field with code %{nnnnn} of the current issue that has a value satisfying a boolean expression predicate in distinct issues.

Where the string value of the field with code %{nnnnn} is represented by ^%.


timeInValue(string field field, issue list issues, boolean expression predicate) #Output: Number



Parser expressionDescription


timeInValue(%{00000}, subtasks(), ^% ~~ "ERROR" OR ^% ~~ "WARNING"


The function returns a representing the sum of milliseconds  of the field summary (field code %{00000}) of all sub-tasks of the current issue that contained any of the words "ERROR" or "WARNING", ignoring the case.


timeInValue(%{00094}, epic(), count(toStringList(^%, ",")) > 1)


The function returns the  of milliseconds of the field components (field code %{00094}) in a linked Epic issue that contained more than one selected component.


timeInValue(%{00017}, filterByIssueType(linkedIssues(), "Bug, New Feature"), ^% in ["Critical", "High"])


The function returns a representing the sum of milliseconds of all linked Bugs and New features of the current issue that had a priority (field code %{00017}) value of Critical or High.



Parameters used in this function

ParameterInput (data type)Description
xx

Parameter description.
xxx

Parameter description.

xxx

Parameter description.



The function returns a




The function returns a representing the sum of milliseconds of a number or date-time field with code {nnnnn}of the current issue that has a value satisfying a boolean expression predicate in distinct issues.

Where the string value of the field with code {nnnnn} is represented by ^.


timeInValue(number field field, issue list issues, boolean expression predicate) #Output: Number



Parser expressionDescription


timeInValue({00012}, subtasks(), ^ != null


The function returns the of milliseconds of the field Due Date (field code {00012}) of all sub-tasks of the current issue that had a value.


timeInValue({10001}, epic(), ^ >= 5 AND ^ <= 10)


The function returns the of milliseconds of a hypothetical numeric field called Passengers (field code {10001}) of an Epic issue that had a value between 5 and 10.


timeInValue({10001}, filterByIssueType(linkedIssues(), "Bug, New Feature"), modulus(^, 2) = 0)


The function returns the of milliseconds of a hypothetical numeric field called Passengers (field code {10001}) that had an even value in any linked Bug or New Feature..



Parameters used in this function

ParameterInput (data type)Description
<parameter>

Parameter description.
<parameter>

Parameter description.

<parameter>

Parameter description.



The function returns a




The function returns the  of milliseconds of a string field with code %{nnnnn}of the current issue that had a value satisfying a boolean expression predicate.

Where the string value of the field with code %{nnnnn} is represented by ^%.

The time being calculated by this function is only counted during a defined schedule with a name "schedule_name" in a certain time_zone


timeInValue(string field field, boolean expression predicate, string schedule_name, timeZone time_zone) #Output: Number



Parser expressionDescription


timeInValue(%{00094}, count(toStringList(^%, ",")) > 1, "my_schedule", LOCAL) 


The function returns the of milliseconds of the field components (field code %{00094}) of the current issue that contained more than one selected component, within a schedule named "my_schedule" in the server's default time_zone.


timeInValue(%{00017}, ^% in ["Critical", "High"], "my_schedule", LOCAL)


The function returns the of milliseconds of the current issue that had a priority value of Critical or High (field code %{00017}), within a schedule named "my_schedule" in the server's default time_zone.


timeInValue(%{00000}, ^% ~~ "ERROR" OR ^% ~~ "WARNING", "my_schedule", LOCAL)


The function returns the of milliseconds the field summary (field code %{00000}) of the current issue that contained any of the words "ERROR" or "WARNING", ignoring the case, within a schedule named "my_schedule" in the server's default time_zone.



Parameters used in this function

ParameterInput (data type)Description
<parameter>

Parameter description.
<parameter>

Parameter description.
<parameter>

Parameter description.
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. 



The function returns a




The function returns the of milliseconds of a number or date-time field with code {nnnnn} of the current issue that had a value satisfying a boolean expression predicate.

Where the numeric value of the field with code {nnnnn} is represented by ^.

The time being calculated by this function is only counted during a defined schedule with name "schedule_name" in a certain time_zone.


timeInValue(number field field, boolean expression predicate, string schedule_name, timeZone time_zone) #Output: Number



Parser expressionDescription


timeInValue({00012}, ^ != null, "my_schedule", LOCAL)


The function returns a of milliseconds the field Due Date (field code {00012}) of the current issue that had a value, ignoring the case, within a schedule named "my_schedule" in the server's default time_zone.


timeInValue({10001}, ^ >= 5 AND ^ <= 10, "my_schedule", LOCAL)


The function returns a of milliseconds of a hypothetical numeric field called Passengers (field code {10001}) of the current issue that had a value between 5 and 10, within a schedule named "my_schedule" in the server's default time_zone.


timeInValue({10001}, modulus(^, 2) = 0, "my_schedule", LOCAL)


The function returns a of milliseconds a hypothetical numeric field called Passengers (field code{10001}) in current issue that had an even value, within a schedule named "my_schedule" in the server's default time_zone.



Parameters used in this function

ParameterInput (data type)Description
<parameter>

Parameter description.
<parameter>

Parameter description.
<parameter>

Parameter description.
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. 



The function returns a




The function returns a  representing the sum of milliseconds of a string field with code %{nnnnn} that had a value satisfying a boolean expression predicate in distinct issues.

Where the value of the field with code %{nnnnn} is represented by ^%

The time being calculated by this function is only counted during a defined schedule with name "schedule_name" in a certain time_zone.


timeInValue(string field field, issue list issues, boolean expression predicate, string schedule_name, timeZone time_zone) #Output: Number



Parser expressionDescription


timeInValue(%{00000}, subtasks(), ^% ~~ "ERROR" OR ^% ~~ "WARNING", "my_schedule", LOCAL)


The function returns the representing the sum of milliseconds of the fields summary (field code %{00000}) of all sub-tasks of the current issue that contained any of the words "ERROR" or "WARNING", ignoring the case, within a schedule named "my_schedule" in the server's default time_zone.


timeInValue(%{00094}, epic(), count(toStringList(^%, ",")) > 1, "my_schedule", LOCAL)


The function returns the of milliseconds of the field components (field code %{00094}) in the linked Epic issue that contained more than one selected component, within a schedule named "my_schedule" in the server's default time_zone. .


timeInValue(%{00017}, filterByIssueType(linkedIssues(), "Bug, New Feature"), ^% in ["Critical", "High"], "my_schedule", LOCAL)


The function returns the representing the sum of milliseconds of all linked Bugs and New Features of the current issue that had a priority (field code %{00017}) value of Critical or High, within a schedule named "my_schedule" in the server's default time_zone



Parameters used in this function

ParameterInput (data type)Description
<parameter>

Parameter description.
<parameter>

Parameter description.
<parameter>

Parameter description.
<parameter>

Parameter description.
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. 



The function returns a




the function returns a  representing the sum of milliseconds of a number or date-time field with code {nnnnn} has had a value satisfying a boolean expression predicate in distinct issues, where the numeric value of the field with code {nnnnn} is represented by ^

The time being calculated by this function is only counted during a defined schedule with name "schedule_name" in a certain time_zone.


timeInValue(number field field, issue list issues, boolean expression predicate, string schedule_name, timeZone time_zone) #Output: Number



Parser expressionDescription


timeInValue({00012}, subtasks(), ^ != null, "my_schedule", LOCAL)


The function returns the  of milliseconds the field Due date (field code {00012}) of all sub-tasks of the current issue that had a value, within a schedule named "my_schedule" in the server's default time_zone


timeInValue({10001}, epic(), ^ >= 5 AND ^ <= 10, "my_schedule", LOCAL)


The function returns the  of milliseconds a hypothetical numeric field called Passengers (field code {10001}) in the linked Epic issue has had a value between 5 and 10, within a schedule named "my_schedule" in the server's default time_zone


timeInValue({10001}, filterByIssueType(linkedIssues(), "Bug, New Feature"), modulus(^, 2) = 0, "my_schedule", LOCAL)


The function returns the  of milliseconds a hypothetical numeric field called Passengers (field code {10001}) that had an even value in any linked Bug or New Feature, within a schedule named "my_schedule" in the server's default time_zone



Parameters used in this function

ParameterInput (data type)Description
<parameter>

Parameter description.
<parameter>

Parameter description.
<parameter>

Parameter description.
<parameter>

Parameter description.
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. 



The function returns a