Questions for Confluence license has expired.

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

How do I create a sub-task for the current issue with firstSync?

 
2
1
0

Sorry, my English is bad.

I hope you understand my question anyway. :-)

I would like to create a sub-task for the current issue during firstSync.

This sub-task should be linked directly to the parent issue.


Is there a script / rule example for this?

I work with Jira and Jira Service Desk.

Best Regards,
Mirko


    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi!


      I don't have the exact script in hand but I wanted to make you aware that from the scripts, you have access to all the Jira Java APIs that allow you to do this kind of actions. If you are familiar with script runner then you will have some experience with writing this kind of scripts. For example to get the IssueService service from the script, you can do something like:


      def is = com.atlassian.jira.component.ComponentAccessor.getIssueService()
      
      

      You could use this issue service from Atlassian to create an issue, setting a parent Id. I would even recommend to look for "Creating subtask" on script runner docs, as the scripts you will find will also be valid for exalate, I have found this: https://community.atlassian.com/t5/Jira-questions/Scriptrunner-Create-Subtask-for-a-task-which-is-created-by-quot/qaq-p/885501


      Hope this helps (smile) 


      Juan


        CommentAdd your comment...