[2017-07-05] Released Jira Workflow Toolbox 2.2.39
New features
1) Support for doing time calculations on Custom Schedules
Now, you will be able to do any time calculations on the very particular work-schedule(s) of your company or organization.
You can define one or more custom schedules at Administration > Add-ons > Jira WORKFLOW TOOLBOX > Schedule
using Schedules Definition Grammar, which is a very powerful language capable of defining schedules as complex as you might imagine.
Then you have the following functions available to do time calculations on your custom schedules, using any feature of the plugin (conditions, validations, post-functions and calculated fields):
Function | Returned value |
---|---|
inSchedule(number time_instant, string schedule_name, string additional_terms, timeZone time_zone) : boolean | Similar to previous function, but with extra parameter additional_terms, which is a string containing extra Schedule Definition clauses that will be attached to schedule with name schedule_name. This function can be used to include personal holidays to an existing schedule. Example without additional terms: |
timeDifference(number higher_instant, number lower_instant, string schedule_name, timeZone time_zone) : number | Returns the number of milliseconds elapsed from lower_instant to higher_instant within schedule with name schedule_name for time_zone timezone. Example: |
timeDifference(number higher_instant, number lower_instant, string schedule_name, string additional_terms, timeZone time_zone) : number | Similar to previous function, but with extra parameter additional_terms, which is a string containing extra Schedule Definition clauses that will be attached to schedule with name schedule_name. This function can be used to include personal holidays to an existing schedule. Example without additional terms: |
addTime(number base_instant, number offset, string schedule_name, timeZone time_zone) : number | Returns the time instant resulting of adding offset milliseconds to base_instant within schedule with name schedule_name for time_zone timezone. Example: |
addTime(number base_instant, number offset, string schedule_name, string additional_terms, timeZone time_zone) : number | Similar to previous function, but with extra parameter additional_terms, which is a string containing extra Schedule Definition clauses that will be attached to schedule with name schedule_name. This function can be used to include personal holidays to an existing schedule. Example without additional terms: |
In the examples above we have used schedule "my_schedule"
, which definition in Schedules Definition Grammar is:
Note that 2017/12/01
is Friday, and 2017/12/04
is Monday.
A typical usage example is: Automatic work log with start and stop work transitions
2) Other new functions added to the parser:
Function | Returned value |
---|---|
issueIDFromKey(string issue_key) : string | Returns the internal ID of issue with key issue_key. This function also admits a comma separated list of issue keys, and returns a comma separated list of internal IDs. Example: issueIDFromKey("CRM-1") returns "10001". |
issueKeyFromID(string issue_ID) : string | Returns the issue key of issue with internal ID issue_ID. This function also admits a comma separated list of issue IDs, and returns a comma separated list of issue keys. Example: issueIDFromKey("10001") returns "CRM-1". |
timeZone(string timeZone_name) : timeZone | Returns the timeZone whose name is represented by string timeZone_name. This function is useful to obtain a timeZone from a string, like the value of a Project Property. Example: timeZone("DST") returns DST timeZone. |
Bug fixes
- Issue #636 - Function
latestReleasedVersion()
failed when there are version with no release date.