Hi,
So i got 2 fields Name and Reporting Level. I only want user to be able create Initiative if any of following conditions are met:
1. If Reporting Level is 6 and Name is Empty.
2. If report Level is between 1-5 and Name is NOT empty.
If Reporting Level is between 1-5 and Name IS empty, user gets an error message.
Any advice on achieving this?
Hi @Joel Batac,
you could do it with a Simple scripted validator with the following code:
def name = cfValues['Name']?.value
def reportingLevel = cfValues['Reporting Level']?.value
int intReportingLevel = (reportingLevel != null && !reportingLevel.toString().trim().isEmpty()) ? reportingLevel as Integer : 0
String strName = (name != null && !name.toString().trim().isEmpty()) ? name.toString() : ""
return (intReportingLevel == 6 && strName.isEmpty()) || (intReportingLevel < 6 && !strName.isEmpty())
Hi,
You will need an app for that, not sure what you already have but you should be able to achieve that with Scriptrunner.
Workflow Toolbox should work also and probably Jira Suite Utilities.
With scriptrunner you should be able to use a simple script validator.
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.