🚀 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.

On this page


Example: Limit past dates for current work logs

We will explain how to implement a validation for preventing work logs with a beginning date before a time limit in the past.

In particular, we will explain how to avoid work logs where the associated date is earlier than 10 days in the past, i.e. If we are on march 25th, today we only allow work logs with march 15th or later as a beginning date.


Enforce work logs through transitions

First we need to enforce users to log all the work using transitions in our workflows, instead of using "Log Work" operation at the issue screen. To do it we will:

  1. Remove "Log Work" option from operation menuAdministration > Add-ons > Manage add-ons > Filter by "System" > Issue Operations Plugin > Disable module "View Issue Ops Bar Work Link"



  2. Create a screen with only one field: "Log Work". You can call it "Work Log in Transition".



  3. Add reflexive transitions called "Log Work" in the statuses of our workflow where we want users to be allowed to log work, and we associate them the screen "Work Log in Transition", created in the previous step. These transitions have the same status as origin and destination, leaving the issue in the same status, but showing the user a screen where they will be able to log work.

Typically you will add this transition to "In Progress" status, but you can add this transition to all statuses easily using a global reflexive transition.

You can use conditions or validations to limit who can execute these transition, and thus who can log work.


Now we only need to insert Boolean Validator with math, date-time or text-string terms in "Log Work" transitions using the following configuration:


Boolean expression used is: datePart({00057}, LOCAL) - datePart({00166}, LOCAL) <= 10 * {DAY}


Note that:

  • {00057} is code for numeric value of virtual field "Current date and time"
  • {00166} is code for numeric value of virtual field "Date and time of work logged in transition"

Once all the post-functions have been inserted, transition "Log Work" will look like this:


Other variation of the usage example

If you want to limit valid work logs to dates within current week you should use any of the following validations:

Weeks begin on Sundays

dayOfTheWeek({00057}, LOCAL) <= (datePart({00166}, LOCAL) - datePart({00057}, LOCAL)) / {DAY} AND (datePart({00166}, LOCAL) - datePart({00057}, LOCAL)) / {DAY} <= 7 - dayOfTheWeek({00057}, LOCAL)

Weeks begin on Mondays

dayOfTheWeek({00057}, LOCAL) != {SUNDAY} ? (2 - dayOfTheWeek({00057}, LOCAL) <= (datePart({00166}, LOCAL) - datePart({00057}, LOCAL)) / {DAY} AND (datePart({00166}, LOCAL) - datePart({00057}, LOCAL)) / {DAY} <= 8 - dayOfTheWeek({00057}, LOCAL)) : (-6 <= (datePart({00166}, LOCAL) - datePart({00057}, LOCAL)) / {DAY} AND (datePart({00166}, LOCAL) - datePart({00057}, LOCAL)) / {DAY} <= 0)



Other examples of that function