Suppose we have 2 dropdown fields: Requested date & Target date
the scenario is:
Hello,
What are the numbers? Are these values of the custom field or option ids?
If they are values then your code would be like this:
import com.atlassian.jira.component.ComponentAccessor
def reqDate = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Requested date")
def targetDate = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Target date")int reqDateValue = Integer.parseInt(issue.getCustomFieldValue(reqDate).toString())
int targetDateValue = Integer.parseInt(issue.getCustomFieldValue(targetDate).toString())
if (targetDateValue < reqDate) {
return false;
}
return true;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mamta Verma you are welcome!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.