Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

How to get parent issue type

 
1
0
-1

Hello,


We want to know how to find the parent issue type name when child tasks are synchronized, because we have to use different logic depending on the parent issue type.


Please give us good advice for resolving our problem.



Thanks

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      In the outgoing sync you can lookup the parent issue using the issueManager


      Outgoing sync - UNTESTED
      import com.atlassian.jira.component.ComponentAccessor
      import com.atlassian.jira.issue.IssueManager;
      
      IssueManager im = ComponentAccessor.getIssueManager()
      
      def parentIssue = im.getIssueObject(issue.parentId)
      def parentIssueTypeName = parentIssue?.issueType?.name
      
        CommentAdd your comment...