Executing commands from a comment in VCS Change Commit in YouTrack / TeamCity integration

This does not work for me, although I get TeamCity links to YouTrack problems that I insert in VCS comments, such as ID-nnn, but if I use the "# ID-nnn fixed" form, this command should change the status of the problems in YouTrack.

As I try to get the above to work, I have my YouTrack-> TeamCity Integration-> mapping-> Actions-> Apply command set to empty, but I found any command provided there and doing nothing.

My guess is that I am missing some kind of magic dust regarding the state of the item in YouTrack, which would allow it to qualify for the VCS Items command, and that in my testing I am not performing the proper workflow. I suppose that:

  • Make the assembly, release the assembly in YouTrack (Admin-Project-> Fields-> Fix Versions, add the version number, release it)

  • Wait for problems to be created and assigned to this assembly through Item: Affected Versions.

  • Take the problem identifier and use it in VCS comments as a command: # ID-nnn fixed
  • Commit, start the assembly.
  • Go to YouTrack and see that the status of the problems is now fixed.

In short, what are the qualifiers for the element affected by the VCS commands, what is the proper workflow, and how can I get the integration mapping command (which I left empty above) to work?

+4
source share
2 answers

If the problem with setting a certain state when applying the command from the commit is not required.

I suggest you take a look at the TeamCity Changes tab for a problem that you expect the team to affect. I suspect that the most likely reason for this is not because YouTrack does not recognize the user that the team should execute on behalf of. The trick is that YouTrack must match the VCS author for this user. This implies two steps:

  • TeamCity corresponds to the VCS author for the user. The correct TeamCity username on this view ensures that this step is in order.

  • YouTrack is looking for a suitable user via email provided by TeamCity. You can verify that this step has been completed successfully on the aforementioned TeamCity Changes tab. Also make sure your configuration meets the requirements specified in the document: http://confluence.jetbrains.net/display/YTD3/Configuring+TeamCity+Integration

Hope this helps.

Yours faithfully,

Alexander Wolfman

+2
source

I also had a problem with the fact that YouTrack did not execute my commands, although they were correctly extracted from SVN.

In my case, YouTrack could find my address in two user profiles and, therefore, could not decide which user would execute this command. Thus, the solution was to reassign the "root" account to a colleague and save my address only in my personal account.

It’s a little strange that the email address is used in general, it would be better just to combine the usernames between TeamCity and YouTrack or to configure the display of users in YouTrack.

+1
source

Source: https://habr.com/ru/post/1380668/


All Articles