...
Code Block | ||
---|---|---|
| ||
string[] statuses = {"Opened", "Reopened"}; string errorMsg = "Parent issue should have status Opened or Reopened!"; if(!isNull(parent) && !elementExists(statuses, parent.status)) { return false, errorMsg; } |
Validation
...
The below example shows a SIL validator which forces a custom field to be required in resolve screen only if the resolution was set to 'Fixed':
Code Block | ||
---|---|---|
| ||
string errorMsg = "To resolve the issue as 'Fixed' you should give a value to field 'Color'.";
if(!hasInput("customfield_10000")) {
return false, "customfield_10000", errorMsg;
} |
Validation on linked issues
Blocking Start Progress transition whenever current issue has a link of type Blocks with an issue in a status different from Resolved and Closed:
...