Number
This function adds time to a given timestamp based on a JWT calendar specification.
addTime(timestamp, timeToAdd, calendarName, timeZone) #Output: Number
Examples
Assumption: A custom JWT calendar called "my_calendar" has been defined as follows:
MON - THU {
08:00 - 15:00,
16:00 - 19:30;
}
FRI {
08:00 - 15:00;
}
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns a timestamp representing: "2017/12/04 10:01" |
|
Bash
|
This example returns a timestamp representing: "2017/04/20 13:00" |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
number |
The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date). |
|
|
number |
Time to be added in milliseconds. Usually time macros will be used to convert to input to hours, days etc. |
|
|
text |
The name of the used JWT calendar. |
|
|
timezone |
The time zone used for the calculation. |
Output
This function returns a number representing a timestamp.
Number with additional specifier
Variant of the function where you can define an additional JWT calendar specification.
addTime(timestamp, timeToAdd, calendarName, additionalSpecifier, timeZone) #Output: Number
Examples
Assumption: A custom JWT calendar called "my_calendar" has been defined as follows:
MON - THU {
08:00 - 15:00,
16:00 - 19:30;
}
FRI {
08:00 - 15:00;
}
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns a timestamp representing: "04/Dec/20 13:00" A day consists of 10.5 hrs according to my_calendar. Adding 25 hrs to the specified timestamp, ignoring December 2nd, results in December 4th, 1PM. |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
number |
The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date). |
|
|
number |
The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date). |
|
|
text |
The name of the used JWT calendar. |
|
|
text |
A text containing an additional JWT calendar specification. |
|
|
timezone |
The time zone used for the calculation. |
Output
This function returns a number representing a timestamp.
The output can be written into any Jira field of type Date Picker ore Date Time Picker.
Another very common use case is to use this function in one of the JWT calculated date-time fields.
(books) Use cases and examples
| Use case | JWT feature | Workflow function | Field type | Automated action | Parser functions |
|---|---|---|---|---|---|
| Predicted resolution date based on business hours |
|
addTime() | |||
| Add days skipping weekends and holidays to a Date Picker field |
|
addTime() |