Skip to end of banner
Go to start of banner

Copy watchers to sub-tasks (Process)

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 4 Next »

Call this script on a set schedule. It will add the watchers from the parent issue to all subtasks.

string [] keys = selectIssues("key in silJQLList(\"silJql_IssuesWithSubtasks.sil\", \"Project = EX\") AND statusCategory not in (Done)");

for(string k in keys) {
    for(string s in subtasks(k)) {
        
        %s%.watchers += %k%.watchers;
    }
}

The JQL script can be replace by a predefined JQL function hasSubtasks.

This script is used in silJQL to return a list of all issues with subtasks. Script takes a JQL search as a parameter.
Use with silJQLList.
Example: key in silJQLList("silJql_IssuesWithSubtasks.sil", "Project = EX")

string [] keys = selectIssues(argv[0]);
string [] ret;
for(string k in keys) {
    if(size(subtasks(k)) != 0) {
        ret += k;
    }
}

return ret;

  • No labels