Migrating away from YouTrack

← Back

Are you a JetBrains YouTrack user? It is probably one of the best issue tracking systems out there and I have tried a few.

The current one that seems to be in vogue at the moment is JIRA, and we are migrating across. On the whole YouTrack is easier to use, however there are probably some advantages (workflows, reporting) where JIRA may shine.

In any case if you want a text dump of all the information you have stored in YouTrack, there is a great article on this on Gerben’s blog:

Exporting your bugs out of YouTrack

This gave me the head start I needed, and pasting that into VS 2015 had me most of the way there. Instead of displaying the info in a console window, I actually wanted to save this info into a discrete file per issue, in the format of:

XX-1 — Issue summary.txt

So the project short code, issue number, and summary in the file name, then the same details in the file with the description and date, a list of all the comments when they were added and by whom and then a list of the attachments.

It might have been nice to export all the attachments as well, but for our purposes we are good just to have the issue text available to search through. We aren’t importing this anywhere, it’s more a case of being able to see what we did in the past…

Two things you need to do first:

  1. Enable REST API in your YouTrack settings page.
  2. Add the “YouTrackSharp” NuGet package to your project.

Then paste in the following code and update the Username and Password to whatever you are using to log in. Use an admin login with access to all the projects if possible.

📎 Embedded code sample (originally a GitHub gist: https://gist.github.com/ozando/655506c425cc3ff3c76fbcbd5a97942e.js) — no longer available.

This will then create a directory called youtrack-issues.

Then run the program.

Watch the console output command window and your folder as the program iterates over all your projects and dumps each one out into its own file.

I had a lot of exceptions. It seems every so often WriteLine will get into a strange state? In any case if you run the program again it will then work ok and carry on until there is another exception later on. If anyone knows what is going on please add in the comments below. However after about 20 runs I had all the issues saved out…

Originally published at http://fmair.blogspot.com. (June 14, 2016)