Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleSIL Code
number STATUS_OPEN = 1;
string[] status_history = fieldHistory(key, "status");
string previous_status = getElement(status_history, size(status_history)-3);

return previous_status == STATUS_OPEN;

Cascading select comparer

A workflow condition that allows you to disable a particular transition when two cascading selects are equals:

...

Code Block
titleCascading select comparer
//Condition Cascading select comparer

if(length(customfield_10000) == 0 && length(customfield_10001) == 0) { //both cascading select are empty
   return true;
}
if(customfield_10000 == customfield_10001) {
   return true;
}
return false;

Condition based on regular expression

A workflow condition that allows you to disable a particular transition when a custom field value doesn't match to a regular expression:

...

Code Block
titleCondition based on regular expression
//Condition based on regular expression

return matches(Combo, "accepted(.)(\\\\d+\\\\.?){10}(.)[a-z]+(-)(\\\\d+\\\\.?)");

Condition based on linked issues

A workflow condition that allows you to disable a particular transition when the current issue has no linked issues:

Code Block
titleCondition on linked issues
//Condition on linked issues

return size(linkedIssues(key)) > 0;

Condition on non-linked issue

A workflow condition that allows you to disable a particular transition when the current issue has linked issues:

...