View and Edit VCS Changes
The activity stream shows a list of VCS commits or other VCS updates 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 TeamCity, Upsource, or a VCS repository. 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 VCS commit message. Use this information to track the changes in your code base that are related to each issue.
VCS Commits
The following information is displayed for VCS commits that reference the current issue. VCS commits can be processed by YouTrack from TeamCity, Upsource, or a VCS integration.
The name of the user who committed the changes to the code repository.
The date and time when the commit was fetched from the repository.
The commit message that was entered for the VCS change.
When you move the pointer over a VCS change, additional actions are shown:
Action | Description |
---|---|
View commit | This control shows the abbreviated commit hash that is associated with the VCS change. Click the hash to view the change details in the connected resource. When VCS changes 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 VCS changes that were added manually or contain errors. |
Detach | Removes the VCS change from the current issue. When the commit message contains the issue ID, the VCS change is detached but remains visible in the activity stream in a dimmed state. |
Move | Opens the Move Change dialog. Enter the ID of the target issue and click the Move button to confirm the action. |
VCS 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.
Matching VCS Commit 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.
Connection Type | Description |
---|---|
TeamCity Integration | 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. |
Upsource Integration | 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. |
VCS Integrations | 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.