Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Greeting! I'm trying to copy assignee from parent link ("is Parent of") to child("is Child of") by SIL listener
Help me pls to fix this script.
My script looks like this:
if(project == "AISRITS" && issueType == "Requirement"){
JIssueLink[] jIssueLinks = getIssueLinksDetail(key);
string assignee;
string papa = linkedIssues(key, "Parent");
string nepapa = linkedIssues(key, "Child");
for(JIssueLink jIssueLink in jIssueLinks){
if(jIssueLink.issue.issueType == "Sub-Requirement" &&
jIssueLink.description == "is Child of"{
//jIssueLink.description == "is Parent of"{
nepapa.assignee = papa.assignee;
}
}
}
Hi!
Does your script throw an error or does it do something different then you want.
Regardless, it still contains a syntax error. You are missing a ) after "is Child of". So to run the code should be:
if (project == "AISRITS" && issueType == "Requirement") {
JIssueLink[] jIssueLinks = getIssueLinksDetail(key);
string assignee;
string papa = linkedIssues(key, "Parent");
string nepapa = linkedIssues(key, "Child");
for (JIssueLink jIssueLink in jIssueLinks) {
if (jIssueLink.issue.issueType == "Sub-Requirement" &&
jIssueLink.description == "is Child of") {
nepapa.assignee = papa.assignee;
}
}
}
Hope this helps!
Jeroen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.