View and Edit VCS Changes
The activity stream shows a list of VCS changes that are associated with the current issue. These events are visible when the VCS changes filter is enabled. This information is only available when the project is integrated with a version control system. YouTrack can integrate with a version control system directly, or through another application that is connected to version control, like Upsource, TeamCity, or Jenkins.
If the visibility setting for the integration is restricted to one or more groups, you only see the VCS changes if you are a member of one of the specified groups.
VCS changes are added to issues automatically when the issue is mentioned or a command is applied to an issue in a commit message or pull/merge request. Use this information to track the changes in your code base that are related to each issue.
Commits are added to the collection of VCS changes whenever the issue is referenced in a commit message. The following information is displayed for commits that reference the current issue.
The name of the user who committed the changes to the repository.
The date and time when the commit was retrieved from the repository.
The commit message that was entered for the VCS change.
When you move the pointer over the commit event in the activity stream, additional actions are shown in the toolbar:
This control shows the abbreviated commit hash that is assigned to the VCS change. Click the hash to view the change details in the connected resource. When commits are recorded in more than one resource, click the down arrow and choose the resource that you want to open.
View additional info
Move the pointer over the info icon to see additional details. This action is shown for commits that were added manually or contain errors.
Removes the VCS change from the current issue. When the commit message contains the issue ID, the commit is detached but remains visible in the activity stream in a dimmed state.
Opens the Move Commit dialog. This gives you the ability to remove the commit from the current issue and attach it to another issue instead
For more information, see Move a Commit to Another Issue.
Commits that contain errors are highlighted on the page.
If the VCS user that pushed the changes to the repository cannot be matched to a YouTrack user account, the user name is shown in red text. The warning tooltip provides instructions that you can follow to resolve the problem.
If the commit message includes a command that could not be applied to the issue, the command is shown in red text. The warning tooltip shows which part of the command was not recognized.
Add Commits Manually
The activity stream automatically displays changes that mention an issue or apply a command to an issue in the VCS commit message. If there are changes that are related to an issue that were not added to the list of VCS changes automatically, you can add them manually.
To add a commit manually:
Open the issue in single issue view.
Click the Add commit link below the input field for comments.
The input field for comments is replaced with the Commit field.
Enter or paste the hash for the commit in the VCS repository.
Click the Add commit button.
The revision is added to the list of VCS changes.
Move a Commit to Another Issue
If you accidentally reference the wrong issue ID in your commit message, the VCS change doesn't appear where it should. When mistakes like this happen, all you have to do is move the commit to the correct issue.
To move a commit to another issue
Locate the commit in the VCS Changes section of the issue activity stream.
Click the Move icon in the toolbar for the VCS change event.
The Move Commit dialog opens.
Enter the ID of the target issue in the input field provided.
Click the Move button.
The commit is removed from the current issue and added to the collection of VCS changes that are attached to the target issue.
Pull requests (which in some version control systems are called merge requests) are added to the collection of VCS changes whenever the issue is included in the title or description of the pull request.
The following information is displayed for pull requests that reference the current issue.
The name of the user who submitted the pull request or performed an action related to an existing pull request.
The action performed with the associated the date and time.
The number of files with changes that are contained in the pull request.
The reference ID for the pull request, formatted as a link to the object in the integrated version control system.
The pull request description.
Even though pull requests and commits are shown together on the VCS tab of the activity stream, they are handled in different ways.
YouTrack doesn't parse the title and description of the pull request for issue-related commands. Whatever text is written in these fields is formatted in Markdown and shown in the activity stream. Anything that would be processed as a command when included in a commit message is ignored.
Pull requests cannot be attached to an issue manually or moved to another issue. Instead, these references are updated automatically when a user edits the title or description of the pull request in the linked version control system.
Matching VCS Change Authors and YouTrack Users
To link VCS changes and process commands in commit messages, YouTrack has to find a user account that matches the author of the commit message. If a command is specified in the commit message, it is applied based on the access permissions that are granted to the user account in YouTrack. The user account is identified in different ways based on the type of connection to the version control system.
YouTrack checks the email address that is stored in the TeamCity user profile of the user who committed changes to the VCS. To recognize the TeamCity user who committed the change, the VCS user name should be associated with the user profile in TeamCity.
This integration is supported by connecting to an external Hub that manages user accounts for both Upsource and YouTrack. The command is applied in YouTrack by the same user who entered the command in the VCS commit message.
For VCS integrations, the ability to apply commands to issues is limited to users who are members of the Committers group in the VCS integration settings.
If the author of the commit message cannot be found in YouTrack, the command is not applied. The user name is shown in red text on the VCS changes tab. The warning tooltip provides information that you can use to fix the problem.
There are basically two things that users can do to fix this problem:
Use the same email address for their accounts in YouTrack and the integrated VCS.
Add their name (or nickname for Bitbucket) to the list of VCS user names in their Hub accounts.