Move Jira issue from one project to another project

Abyakta Lenka December 11, 2018

I am trying to move an issue from one project to another project using REST API or groovy script or any other method .

 

Very much in need of this .Please help

Abyakta

1 answer

0 votes
Ravi Varma
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.
December 11, 2018

Hi @Abyakta Lenka,

 

If possible, I would request you to explore using JIRA native move issue feature, so that JIRA handles the various pre-requisites and dependencies. 

If not possible, you should have an utility that does the following:

  • Fetch the issue fields and its values from the original project
  • Create the issue along with its fields and values in the second project
  • Delete the issue from the original project
  • Please note that you should be addressing all the mandatory JIRA requirements that are imposed in the original project/issue while moving to the second project
  • Also, you would be losing track of which issue was moved between different projects. If you use the JIRA move issue feature then JIRA would capture the Old Issue key along with the new Issue Key in the Change History

Regards,

Ravi Varma

Abyakta Lenka December 11, 2018

Thanks Ravi, for the response , do you have any thing handy so that i can refer quickly .

Create ticket refereing from the other ticket can be done using REST API but , thats not move because the Issueid will change .

 

Please suggest .

 

Abyakta

Ravi Varma
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.
December 11, 2018

Hi @Abyakta Lenka,

 

Unfortunately, I never used the second option as it is too heavy and restrictive. I always preferred the first option

Please refer the following links

The third option is a combination approach, where you invoke REST APIs to fetch the original issue data and write it to a CSV file (Refer - https://confluence.atlassian.com/jirasoftwareserver073/creating-issues-using-the-csv-importer-861256349.html), which can then be imported to the desired project. Please note that you still need to map the CSV column to appropriate JIRA fields.

Regards,

Ravi Varma

Abyakta Lenka December 11, 2018

Hi Ravi,

 

I was looking for a Programmatic approach either using Groovy or REST API.

I realized there is no public api so thought of asking here in the community who have done it .

 

Abyakta

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 12, 2018

You're going to struggle with this - although people have done it sometimes, it is messy and complex and you have to jump through many many hoops to do the "move" with an internal process as you have to check all of the configuration, the same way the "move" does when you do it in the UI.  If you want to do it from the outside, over REST, then Ravi's answer in the earlier comment is what you need.

The handful of cases I've seen it done (and done it) all rely on knowing the configuration in source and target projects are identical, and all break when they're not.

Generally, you should not move issues, especially "programmatically".  The desire to move issues usually means a broken process, and it is going to be easier, safer, faster and cheaper to fix the process.  Move is for genuine "I made a mistake and put it in the wrong project / selected the wrong issue type", "housekeeping" and "tidying up before or after merge or split".  In all of those cases, a human should mostly be doing it with the UI after making a deliberate business decision that it is needed, so that there's no chance of corrupting the issues.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events