1
0
-1


Considering the following usecase: I am creating an issue in github and I want it to be put as part of a userstory within a jira-project. How to accomplish that?


I can manage to let a new issue being made in Jira, but to make it part of a certain story seems impossible for now. For example in the incoming sync I set issue.parentId() , but it gives me an error “While trying to create an issue of type 'Task' in project 'SB' for remote '15', Jira responded with: ; Field Given parent issue does not belong to appropriate hierarchy: parentId...”.

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi George,


      I believe you are looking to create sub-tasks within a user story for all the issue synced over from Github. I have achieved this using the following method:


      1. Get the ID of the user story in Jira using Rest API.
      2. Add the following in the Jira Incoming script:

        if(firstSync){
           issue.projectKey   = "CM" 
           issue.typeName     = "Sub-task" 
           issue.parentId = 10236//localParent.id
        }

        This will ensure that any issues coming over from GitHub are created as sub-tasks in Jira under the story 10236.


      Please find a short video recording demonstrating the solution. 



      Thanks

      Majid


      1. Ap

        Works like a charm. Thanks for figuring out!

      CommentAdd your comment...