The requirement is that use JQL find the Defect which linked a work package, the work package is defect's parent. If defect's fix version is different with work package's fix version, will scheduler to run this script to set defect's fix version equal to work package's fix version. But I don't know why it not works when I use sil scheduler to run this script. Could you please tell me how to achieve?
My code:
string subJql = "issuetype in (Defect) AND issueFunction in linkedIssuesOf('issuetype = 'Work Package'', 'is a parent of')";
string[] issues = selectIssues(subJql);
for(string issue in issues)
{
string[] linkissues = linkedIssues(issue, "Parent/Child",-1);
for(string linkIssue in linkissues){
if(%issue%.fixVersion != %linkIssue%.fixVersion)
{ %issue%.fixVersion = %linkIssue%.fixVersion; }
}
}
Thanks,
Cecilia