Hi, Requirement - If 'Planned start date' (custom field) is less than two days from now, and 'Env' (custom field) is 'PRD', then only Emergency change category ticket can be created.
I'm writing a JMWE scripted workflow validation to achieve this (not a scripting expert)
if (issue.get("Env") == "PRD")
{ if ((issue.get("Change category") != "Emergency"))
{(issue.get("Planned start date") > new Date() +2)
}}
The problem with this is, that even if Change category is selected as Emergency, it does not allow the ticket creation. What am I doing wrong? Pls help.