JIRA allows you to restore a single Project from an XML backup, see Restoring a Project from Backup.
Since you want to restore (clone) the Project into the same JIRA instance, you should rename the source Project before doing the restore.
For example, if you want to clone Project SRC to TGT
I suggest doing a trial-run of this procedure in a test environment first. (You can easily create a test environment with your XML backup and the copy of the attachements directory you need for the first two steps.)
You can use the JIRA Command Line Interface getIssueList to get all issues within a project. Then there are a couple of options to automate copying them into a new project. Either use createIssue, cloneIssue or runFromCsv to process. This solution is best if it is a regular thing you need to do with automation as opposed to a one time thing :). cloneIssue between projects requires JIRA Clone-Plus plugin
NEW: A new cloneProject CLI action is in progress - a snapshot will be available soon! See JCLI-153 - comments and suggestions welcome there.
Not sure about XML but you can try exporting the issues into Excel, convert the file to CSV and use the in-built CSV importer to import it back to the new project.
This would require all the customfields to be available in the target project as well. And the workflow should be same or else it requires a migration.
Hi Luiza, not specifically answering your question, but you might find this interesting:
Have a look at this plugin:
Specifically have a look at this documentation to see what it does:
You could set up a workflow transition to copy your issue to a new project, and then perform a Bulk Edit operation to transition all your issues (or just the ones returned from your search).
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events