I am using "Update parameters of the Set Field Value from Parent Function for this transition." post function and i want to use the Conditional execution: (Only if condition is true Only execute this post-function if the following Groovy expression returns true) I want to check if the due date is either today or in the future.
Does anyone have a idea how to do this?
Community moderators have prevented the ability to post new answers.
Hi Matt, try using the following sample code. duedays will return then number days left, so as long as this parameter is positive - you haven't reached the due date. Once it's negative - ticket has crossed the due date.
int duedays = (issue.getDueDate().time - new Date().getTime()) / 86400000
I can recommend using Workflow PowerBox plugin (but it's paid one). It contains "Condition Based Post Function". Take it and use "Universal Data/Time Condition" as a condition and your post function. It's not a solution with groovy expression but can be usable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.