Parent issue Type: Sub Engagement
Child issueType: Contract details.
A parent issue can have n number of subtask(child issue).
Each subtask has a field "oracle project #".
Requirement: I need to append or concatenate the field value of each subtasks to it parent issue.
Below is my script:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.SubTaskManager
SubTaskManager subTaskManager = ComponentAccessor.getSubTaskManager();
def cfm = ComponentAccessor.getCustomFieldManager()
Collection subTasks = issue.getSubTaskObjects()
def CD_concatenated = new StringBuffer()
for (currIssue in subTasks)
if (currIssue.getIssueType().name == "Contract Detail")
{
subTasks.each
{ def CD = it?.getCustomFieldValue(cfm?.getCustomFieldObjectByName("Oracle Project #")) CD_concatenated.append(CD + "," + " ") }
}
return CD_concatenated.toString()
I'm getting null values: this might because it is looking for subtask that is not contract details.
and the result is repeating it self..
What am I missing here, how can make the script look for contract details alone.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.