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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.