Html bobswift |
---|
<iframe width="560" height="315" src="https://www.youtube.com/embed/UlECfHAdlQs" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe> |
Bitbucket file macro |
---|
showLineNumbers | true |
---|
title | RequireFieldInSubtask.sil |
---|
url | https://bitbucket.cprime.io/projects/CAP/repos/sil-script-library/raw/Workflow_Validators/RequireFieldInSubtask.sil?at=refs%2Fheads%2Fmaster |
---|
syntaxHighlighting | JavaScript |
---|
|
See also
...
Use this script as a workflow transition validator to allow transition only if a field in the subtask is populated.
Code Block |
---|
string [] subtasks = subtasks(key);
boolean hasField = false;
string errorMsg = "You must have a value for the Fruit field in a subtask entered before this issue can be completed.";
for(string st in subtasks) {
if(isNotNull(%st%.fruit)) {
hasField = true;
}
}
if(hasField == false) {
return false, "error", errorMsg;
} |