Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

move issues to other project using python

suryansh verma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 20, 2022

I am trying to write a python script to move certain issues to a different project but I can't find a way to do the same. I even tried using issue.update() function to update project field but nothing happened.

2 answers

0 votes
Nic Brough -Adaptavist-
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.
October 20, 2022

There is no REST call you can make to move an issue.

Changing the issue type and/or project is not a trivial action, as all the configuration of your issues is hung off the project and issue type in use.  "Move" can change the structure of your issue, and Jira needs to go through a process of telling you what data you are going to lose when you do it and asking you to amend data that does not fit with the new shape the issue needs to be changed into.

You should not be trying to automate this, you need a human to be checking how the data should be changed.  

This of course leads me to want to ask why you're moving an issue?  Is it a one-off, for housekeeping or restructuring?

0 votes
Aron Gombas _Midori_
Community Champion
October 20, 2022

I'm not sure how you're trying this (zero details are given), but you should send a request to the corresponding Jira REST API to do this.

Doing that in Python should be trivial and there are sample code fragments published. If I knew if it is self-hosted Jira or Jira Cloud, I could link those here.

suryansh verma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 20, 2022

As I am new to this domain I don't know whether it is self-hosted Jira or Jira Cloud. But I am using jira package in python to fetch issues and it is working. When it comes to moving issues to a new project I don't know how to do that.

 

I am also not getting any online resource also for this.

Aron Gombas _Midori_
Community Champion
October 20, 2022

Oh, I realize that @Nic Brough -Adaptavist- is probably right. There is no support for this in the REST API...

Nic Brough -Adaptavist-
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.
October 20, 2022

I admit I spent a lot of time looking for one before responding!  I wasn't sure there wasn't a move function, but I was curious to see how Atlassian would handle all the "going to lose data/need to change data" if they had got one.

I also missed the Cloud/Server/DC point.  At the moment, over 99.99% Cloud installs are hosted on <something>.atlassian.net, so if your URL has atlassian.net in it like that, you're on Cloud.  If it doesn't, you're on Server or DC.  Click Help -> About to be 100% sure.

Like Aron Gombas _Midori_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events