Skip to end of banner
Go to start of banner

Require field in subtask (Governance)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Use this script as a workflow transition validator to allow transition only if a field in the subtask is populated.

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;
}
  • No labels