Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Products
  • Jira
  • Questions
  • How do you change a subtask issue to a top-level issue type while maintaining the link to the original parent issue?

How do you change a subtask issue to a top-level issue type while maintaining the link to the original parent issue?

Logan G Hawkes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2012

I have an instance of Jira 4.4.3 with a large number of issues of type "user story". Each user story has a large number of subtasks of type "test case". I need to move all of the test cases to a new issue type that's not a subtask. The problem is that I need to maintain the link from the test case to it's former parent user story. Moving the issues isn't a big problem, but retaining the link back to the parent is difficult. There's no JQL function for getting the parent of a given subtask. I'm dealing with about 3000 test cases and a few hundred user stories, so creating the links manually is a nightmare scenario.

I've tried several approaches. So far my best idea is to write a chunk of Java code that will:

  1. Create a list of all test cases
  2. For each test case
    1. Get the parent issue
    2. Move the test case to the new issue type
    3. Create a link back to the (former) parent user story

I'm hesitant to start coding because I've never tried writing a java app that will make bulk changes to my Jira instance and the prospect of making a mistake and hosing 3000+ issues is daunting. Is there an easier and/or safer way to do this?

1 answer

1 accepted

0 votes
Answer accepted
Bob Swift
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2012

Use the linkIssue action from JIRA Command Line Interface on each of the user story issues to add a link to the issue's parent. Use the runFromSql action with a query that gets each of the issues you need.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events