Uploaded image for project: 'JIRA'
  1. JIRA
  2. JRA-13245

Bulk Convert Issues to Sub-task and back

    Details

    • Feedback Policy:

      JIRA feedback is collected from a number of different sources and is evaluated when planning the product roadmap. If you would like to know more about how JIRA Product Management uses customer input during the planning process, please see our post on Atlassian Answers.

      Description

      Atlassian Status as of 8 June 2015

      Hi everyone,

      Thanks so much for your votes and comments on this issue.

      Good news - this request is currently being implemented and if nothing goes wrong the solution should be available soon. Stay tuned for more updates.

      Thanks for your patience and we hope you appreciate our open approach to feature requests.

      Cheers,

      Bartek
      JIRA Product Management
      bartek (at) atlassian (dot) com

      Original request description

      In 3.9 JIRA introduced "Convert Issue to Sub-task" and "Convert Sub-task to Issue".
      It would be handy to be able to bulk convert.

        Issue Links

          Activity

          Hide
          jelena.radovanovic1 jelena.radovanovic added a comment -

          Hello Ovidiu Vasilescu,

          Here is the script that I used:

          
          import com.atlassian.jira.ComponentManager
          import com.atlassian.jira.issue.comments.CommentManager
          import com.opensymphony.workflow.WorkflowContext
          import org.apache.log4j.Category
          import com.atlassian.jira.issue.Issue
          import com.atlassian.jira.issue.IssueManager
          import com.atlassian.jira.issue.CustomFieldManager
          import com.atlassian.jira.issue.fields.CustomField
          import com.opensymphony.workflow.WorkflowContext
          import com.atlassian.jira.config.SubTaskManager
          import com.atlassian.jira.component.ComponentAccessor
          import com.atlassian.jira.security.Permissions
          import com.atlassian.jira.event.type.EventDispatchOption
          import com.atlassian.jira.user.ApplicationUser
          import com.atlassian.jira.issue.MutableIssue
          
          
          IssueManager issmngr = ComponentManager.getInstance().getIssueManager()
          def subTaskManager = ComponentAccessor.getSubTaskManager()
          def customFieldManager = ComponentAccessor.getCustomFieldManager()
          
          Issue issue = null
          
          def list = ["SUBTASK-1","SUBTASK-2","SUBTASK-3"]
          
          def parent = issmngr.getIssueObject("PARENT-1")
          
          for( String key in list)
          {
          issue = issmngr.getIssueObject(key)
          def subTaskIssueTypeId = "5"
          	issue.setIssueTypeId(subTaskIssueTypeId) 
          	issue.store()
              ComponentAccessor.getSubTaskManager().createSubTaskIssueLink(parent, 
                                                                           issue, 
                                                                           ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser())
          
          
          
          issue.store()
          parent.store()
          }
          
          
          Show
          jelena.radovanovic1 jelena.radovanovic added a comment - Hello Ovidiu Vasilescu, Here is the script that I used: import com.atlassian.jira.ComponentManager import com.atlassian.jira.issue.comments.CommentManager import com.opensymphony.workflow.WorkflowContext import org.apache.log4j.Category import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.IssueManager import com.atlassian.jira.issue.CustomFieldManager import com.atlassian.jira.issue.fields.CustomField import com.opensymphony.workflow.WorkflowContext import com.atlassian.jira.config.SubTaskManager import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.security.Permissions import com.atlassian.jira.event.type.EventDispatchOption import com.atlassian.jira.user.ApplicationUser import com.atlassian.jira.issue.MutableIssue IssueManager issmngr = ComponentManager.getInstance().getIssueManager() def subTaskManager = ComponentAccessor.getSubTaskManager() def customFieldManager = ComponentAccessor.getCustomFieldManager() Issue issue = null def list = [ "SUBTASK-1" , "SUBTASK-2" , "SUBTASK-3" ] def parent = issmngr.getIssueObject( "PARENT-1" ) for ( String key in list) { issue = issmngr.getIssueObject(key) def subTaskIssueTypeId = "5" issue.setIssueTypeId(subTaskIssueTypeId) issue.store() ComponentAccessor.getSubTaskManager().createSubTaskIssueLink(parent, issue, ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()) issue.store() parent.store() }
          Hide
          z8590143 Karsten Sommer added a comment - - edited

          Hi Atlassian - can you please provide an update? When is it going to be available on JIRA onDemand?

          Show
          z8590143 Karsten Sommer added a comment - - edited Hi Atlassian - can you please provide an update? When is it going to be available on JIRA onDemand?
          Hide
          bgatz Bartek Gatz added a comment -

          Hi Karsten Sommer. The code is practically ready. If nothing weird happens we should be able to deploy the solution to Cloud within the next several weeks.

          Show
          bgatz Bartek Gatz added a comment - Hi Karsten Sommer . The code is practically ready. If nothing weird happens we should be able to deploy the solution to Cloud within the next several weeks.
          Hide
          vscafati V C Scafati added a comment -

          I am also very interested in knowing when this will be released. I have a number of projects that need to have subtasks promoted to parents, and I need to figure out whether I should wait for the bulk feature, or tackle them manually.

          Show
          vscafati V C Scafati added a comment - I am also very interested in knowing when this will be released. I have a number of projects that need to have subtasks promoted to parents, and I need to figure out whether I should wait for the bulk feature, or tackle them manually.
          Hide
          z8590143 Karsten Sommer added a comment -

          Any news Bartek Gatz ? It's nearly September now...

          Show
          z8590143 Karsten Sommer added a comment - Any news Bartek Gatz ? It's nearly September now...

            People

            • Assignee:
              Unassigned
              Reporter:
              nick.menere Nick Menere [Atlassian]
            • Votes:
              412 Vote for this issue
              Watchers:
              221 Start watching this issue

              Dates

              • Created:
                Updated: