Skip to end of metadata
Go to start of metadata

Table of Contents

Why Integrate YouTrack with TeamCity?

Integrating YouTrack with TeamCity 5.0+ has two major advantages:

  1. Whenever an issue has been closed after last known successful build but before a new successful build, TeamCity integration fills the issue's 'fixed in build' attribute with the exact number of the new successful build once it has been assembled:
  2. If an issue ID is referenced in a VCS commit, TeamCity integration adds a link from the issue to the list of version control changes:

    These changes are shown under the TeamCity Changes tab in full issue view:

YouTrack pulls fresh data from TeamCity every minute.

How to Configure TeamCity Integration?

Initial Configuration

  1. Make sure that you have updated your TeamCity installation to version 5.0 (you can download EAP builds).
  2. If you use TeamCity 5.0 EAP build 10642 or later (including TeamCity 5.0 release build), skip this step.
    If you use an earlier TeamCity 5.0 EAP build, download and install an appropriate version of REST plug-in for TeamCity:
  3. In YouTrack Admin area, click TeamCity Integration.
  4. In the TeamCity Integration tab, click Enable TeamCity Integration:
  5. Enter TeamCity installation URL and your TeamCity credentials.
  6. Click Save.

Mapping Projects

You should define mappings between YouTrack projects and TeamCity projects. To configure a mapping:

  1. In the TeamCity Integration tab, click Define mapping.
  2. In the TeamCity Mapping dialog box, do the following:
    1. In the Project drop-down list, select a YouTrack project.
    2. In the TeamCity Project drop-down list, select a TeamCity project.
    3. In the TeamCity Build drop-down list, select a build configuration for the selected TeamCity project.
    4. To specify which user groups should be able to use TeamCity integration, click Restrict Access. In the Visible for Groups combo box, choose groups that will be allowed to use TeamCity integration:
    5. Click Save.
      Project mappings that you have created are displayed in a table on the TeamCity Integration tab:

How to Use TeamCity Integration?

  • To map issues to change commits: When you're committing changes associated with an issue to your version control system, specify an issue ID in a comment to your commit, like this:
    fixed YP-2046
    TeamCity will transform the issue ID into a link to the corresponding YouTrack issue, and copy its summary right into the comment:

    On the other hand, a link to the associated change commit will be created in the YouTrack issue, visible on the TeamCity Changes tab in full issue view:
  • To replace "next build" with a specific build: When you have resolved an issue and you want YouTrack to map it to the next build assembled by TeamCity, you don't have to do anything special - the "Fixed in build" attribute of any issue gets the value of "Next build" by default. Once you've fixed the issue and TeamCity has assembled a new build containing changes associated with the fix, the exact build number automatically replaces the default "Next build" value.