Examples of Math and Time Expressions
This page presents a collection of expressions valid for JIRA Workflows Toolbox expressions parser.
or since version 2.2.1:
|For a subtask, the number of sibling subtasks.||Function |
or since version 2.2.16:
|Formula to increment a numeric custom field, setting it to |
|Formula for summing 3 numeric custom fields when we are certain that all 3 the fields are initialized. In case any of these fields is not initialized, an error is raised and any of the following 2 expression examples should be used.|
|Formula for summing 3 numeric custom fields when some of them may be uninitialized. When any of this fields is not initialized a zero value is assumed.|
|A more compact syntax for summing 3 numeric custom fields when some of them may be uninitialized.|
Version 2.2.16 or higher is required.
This syntax is available since version 2.2.16.
|Calculates a date 6 natural days earlier than Due Date|
|Returns a date-time value equivalent to adding 36 hour and 45 minutes to date and time of issue creation, skipping the periods of time which correspond to weekend.|
|Same as previous expression, but using Israeli weekend.||Israeli weekend is on Friday and Saturday.|
|Calculates a date 6 work days earlier than Due Date for JIRA Server's local timezone.|
Work days depend on timezone, since certain time moment maybe Sunday in certain timezones, and Monday in another ones.
|Returns the number of working days from Current Date and Time to Due Date, i.e., skipping weekends in JIRA server's timezone.|
|Number of hours since issue creation||Function |
|Number of days to Due Date||Function |
|Returns a date value for next Friday, or for today if it's Friday|
|Returns a date value for next Friday, even if today is Friday.|
Date-Time Calculus on Custom Schedules
Custom Schedules are supported since version 2.2.39.
We use Custom Schedules when we need to do time calculations within the work-schedule of our company or organization, e.g., we want to count only the time from 8:00 to 15:00, and from 16:00 to 19:30.
Functionality provided by functions
subtractDatesSkippingWeekends() can also be implemented using Custom Schedules, and much much more.
Your Custom Schedules are defined in JIRA at Administration > Add-ons > JIRA WORKFLOW TOOLBOX > Schedules.
|Returns the resting time to Due date within my_schedule custom schedule.|
|Returns a date-time value (i.e., an instant in time) obtained by summing 24 hours to current date-time within my_schedule custom schedule.|
Showing Time Durations in Pretty Format
The following examples are string expressions in advanced parsing mode.
|Calculates the time since issue creation, and shows it as a text using whole words like: 12 days 6 hours 34 minutes.|
|Calculates the time since issue creation, and shows it as a text using abbreviations like: 12 d 6 h 34 m.|
|Calculates the time since issue creation skipping weekends, and shows it as a text like: 12 days 6 hours 34 minutes.|
|Calculates the time since issue creation, and shows it as text, but using the workday and workweek defined at time tracking configuration instead of 24 hours per day and 7 days per week.||Example: |
|Similar to the previous expression but shows the result using abbreviations instead of whole words.||Example: |
Asking for Support or Proposing new Examples