Hi,
I am using a Due Date field in my create screen but I am not able to validate it against system date or today's date. When I use date compare validator and compare Due date with created date it didn't work because while creating a ticket created date is null !!
Thanks !!
Have the same problem; Since JIRA accepts past dates in Due date field - would like to validate my due date to be equal to or greater than current date. With Date Compare validator - Says, 'Error creating issue: Could not load validator class'.
Any answers on this would be helpful.
Thanks.
I would do it in your validator for the Start Progress transition so that your Created date is set. Additionally you won't be able to start progress on a task that has a due date before the created date. This won't require you to use a plugin to get the functionality you are looking for.
However if you want to do it on the Create Issue transition then I would use the JIRA Workflow Enhancer Plugin. Use the Universal Validator on the Create Issue Transition with the following settings:
Expression:
{Due Date} > [now]
Evaluate To:
true
Thanks, Ronald. Validating an issue in start progress will nor work for me, since we do not want an issue created with a faulty due date. That option gets ruled out;
Workflow enhancer not available for JIRA 4.0.1 used by us.
Also tried the Date compare with Due date and a custom field that populates current system time for comparision - No Use.
Just tested Dieter's solution and it worked fine. I made a couple of minor tweaks:
import com.opensymphony.workflow.InvalidInputException if (issue.dueDate) { if (issue.dueDate.before(Calendar.getInstance().getTime())) { invalidInputException = new InvalidInputException("Due date must be in the future.") } }
I'm not a technical person; Could you pls. guide me on where to add the mentioned script.
It looks like you're new here. Sign in or register to get started.