Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Html bobswift
<iframe width="560" height="315" src="https://www.youtube.com/embed/UlECfHAdlQs" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>

...

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;
}