Executing Commands from a Comment to a VCS Change Commit
YouTrack allows you to apply commands to issues by specifying them in a comment to a VCS change commit. That is, when commenting your commit specify a command (or several commands) for one or several issues in a specific format, and these commands will be automatically applied to the specified issues in YouTrack. You don't even need to open YouTrack.
Each of command attempts are logged and displayed in an issue's TeamCity Changes and History tabs. If a command provided in a comment can not be executed due to some error, such command will still be shown in the History tab, but as an erroneous command. To see an error reason, hover cursor over the command in the history: the error will be displayed as a tooltip.
General commit comment format for applying commands:
Important notes
|
Batch Issue Operations in Commit Comments
In YouTrack 4.0 we introduce the new feature: applying one command to multiple issues. That is: While committing changes, you can now specify a list of issues that are, for example, fixed by this commit, and provide a command that should be applied to all of them. No more need to specify the same command for each issue individually.
Format of a batch command
For example, the following command should be applied to three issues and should set State to "Fixed", "Reviewed by" field to "john.d", and Revision field to the current revision number:
${revision} placeholder upon processing will automatically be replaced with the current VCS revision number retrieved by TeamCity.
Commenting Issues via Commit Comments
In YouTrack 4.0 we have also added support for commenting issues along with applying commands.
To add a comment to an issue, provide a command to be applied to this issue, and below the command's line provide a comment that should be added along with this change.
For example: