🚀 JWT 3.0 is out 🚀 

The app was completely overhauled, and so was the documentation: Jira Workflow Toolbox (Server/Data Center) Home

The page you are viewing is still valid for all app versions prior to 3.0.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

On this page



Features used to implement the example



Example: Calculate the time elapsed between 2 transition executions

I use post-function Mathematical and date-time expression calculator for calculating time between transitions. But I don't want to log work and use field "Time Spent". I want to use custom field and get time in minutes. How can I do it, using Jira Workflow Toolbox? And second question: Is any chance to get time between transitions in pretty duration format (for example, 1d 2h ).

In order to calculate the time between the execution of 2 different transitions (let's say "Transition A" and "Transition B"), and store the obtained value in minutes into a Number custom field you can use the following solution:

  1. Create Number custom field called "Time elapsed in minutes", where we will store the value obtained.

  2. Create a Date-Time Picker custom field called "Transition A Execution Time"

  3. Insert post-function Mathematical and date-time expression calculator into transition "Transition A" (i.e., the transition executed earlier) using the following configuration:

    • Target field: Transition A Execution Time
    • Formula: {00057}

  4. Insert post-function Mathematical and date-time expression calculator into transition "Transition B" (i.e., the transition executed later) using the following configuration:

    • Target field: select Time elapsed in minutes

    • Formula: ({00057} - {aaaaa}) / {MINUTE}
      replacing aaaaa with the field code of Transition A Execution Time custom field.


Transition A:



Once configured, the transition will look like this:



Transition B:


Text to be parsed is: ({00057}-{10201}) / {MINUTE}


Once configured, the transition will look like this:


Alternative Implementation

You can also represent the time duration between the 2 transition executions as a string in pretty format. To do it, also insert Copy a parsed text to a field post-function into "Transition B" with the following configuration:

  • Target field: a text custom field

  • Parsing mode: advanced

  • Text to be parsed:

    (floor(({00057} - {aaaaa}) / {DAY}) > 0 ? floor(({00057} - {aaaaa}) / {DAY}) + "d " : "") + (floor(modulus(({00057} - {aaaaa}), {DAY}) / {HOUR}) > 0 ? floor(modulus(({00057} - {aaaaa}), {DAY}) / {HOUR}) + "h " : "") + (round(modulus(({00057} - {aaaaa}), {HOUR}) / {MINUTE}) > 0 ? round(modulus(({00057} - {aaaaa}), {HOUR}) / {MINUTE}) + "m" : "")

    replacing aaaaa with the field code of Transition A Execution Time custom field.



Once configured, the transition will look like this:



Other examples of that functions

Mathematical and date-time expression calculator


Copy a parsed text to a field

Related Usage Examples