YouTrack doesn't set "Fixed in build" within TeamCity integration - teamcity

Firstly, I've read How do I get YouTrack field fixed in build filled out using TeamCity integration? and One step YouTrack "Fixed in build" filling with TeamCity integration and it hasn't helped me.
I've configured TeamCity integration in YouTrack and added YouTrack as Issue Tracker in Teamcity. So I'm able to view mentioned issues in TC on Issues tab and there is "VCS Changes" tab in Youtrack and I can see that some issue was mentioned in commit message.
But the issue is - I do not have possibility to set "Fixed in build" field in YT. It neither sets automatically nor manually. It's equal to "Next Build" and that's it. So I wonder how can I:
Set "Fixed in build" at least manually.
Have this field to be set automatically.
Any ideas?

I recommend that you let the field being set automatically. On %YouTrack%/admin/teamcityIntegrationSettings select the appropriate build configuration mapping. There're two options:
Process related issues. It means that it will process resolved issues mentioned in a TeamCity build. 'Mentioned' as it is implemented now means those that TeamCity shows on 'Issues' tab of the build. For this to work you need to configure the integration on TeamCity side as well.
Process issues matching query. It allows you entering a query, and all issues that match it will get their fixed in build field set.

Related

One step YouTrack "Fixed in build" filling with TeamCity integration

I am using TeamCity Professional 8.1 and YouTrack 5.0.6.
I have managed to fill "Fixed in build" field in YouTrack with two step workflow.
I am using #issue-id Fixed command in my Merucrial commit message to change the state of issue in YouTrack.
I made some changes in code ( not related to fixed issue) and I push changes to the server.
When TeamCity finishes the build with changes from the second step it fills the "Fixed in build" field of my issue with the build number.
But the issue was actually fixed in the previous build...
So I want to be able to fill the "Fixed in build" field right in the first build that includes the command to change the state of the issue to Fixed.
Is this possible?
Edit: I have fixed my issue by changed the issue prefix from number "1" to my project name "csv".
Please uncheck 'Process Resolved Issues' option in mapping dialog and make sure time on TC and YT is in sync -- if YT decides a build was created before the issue was fixed, it will not set it into fixed in build.

TeamCity create new bug in youtrack

I am using TeamCity and YouTrack.
I would like when build fails in TeamCity to be automatically created bug in my youtrack system, same way as TFS does.
After registering YouTrack with TeamCity but this does not work for failed builds just gives me.
Any idea how to do this?
I'm not sure there is straight out of the box functionality to do what you require.
But after reading some information, what you could do is setup a build that has a "Finish Build" trigger that would always execute after your first build finishes. (Regardless of success or failure).
Then in that second build, you could use the TeamCity REST API to determine if the last build execution from the first build was successful or not. If it wasn't successful then you could use the YouTrack REST API to create the issue.
TeamCity API Here: http://confluence.jetbrains.com/display/TW/REST+API+Plugin
YouTrack Create Issue API Here: http://confluence.jetbrains.com/display/YTD4/Create+New+Issue

How do I get YouTrack field fixed in build filled out using TeamCity integration?

I am trying to get integration between our YoutTrack and our TeamCity working. However I cannot get YouTrack to fill out the "Fixed in build" field:
Using TeamCity 7.1.3, YouTrack 5.0.2.
TeamCity integration setup points out the "Build Field" to YT's "Fixed in build"
YouTrack correctly shows TeamCity builds in tab "TeamCity Changes".
User names map correctly.
YouTrack commands by VCS commit comments work correctly.
Simple YouTrack issue referencing from commit comments works correctly.
However, no matter what I seem do to, the "Fixed in build" field remains at "Next build".
I tried checking the "Add each build to list" in YT setup. Now the build numbers correctly goes into the Build bundle, but still "Fixed in build" is not set. I also tried with both open and closed issues with no effect.
Any idea what I am missing?
You have to mention the issue in a commit before you mark the issue as fixed. So when you mark the issue fixed it gets set to next build, and on the next build that succeeds you get the fixed in build set - assuming the build that succeeded was the one linked to that youtrack project.
For the longest time you had to have the issue marked fixed in youtrack before any builds would cause the fixed in build to be set.
So, commit with issue ID, then mark issue fixed in next build. You can refresh the teamcity integration from the issue so it picks up the build.
First I fix the issue in the code. Commit the change to source control. Then in YouTrack - I mark the issue "Fixed"
You can also manually link the issue to the commit.

display all the resolved issues since the previous build

I have two build configurations- a dev configuration (builds on every checkin), and a QA configuration (builds on-demand, whenever a version for qa is released. We don't do continuous deployment (yet)).
When a version for QA is released, I'd like to be able to know what issues have been resolved since the last version. (format is not important- report / chart / text...),
Meaning- i'd like to know all the issues that have been changed to 'resolved' since the date of the last build in this configuration.
I'm using tfs teamcity issue tracker.
Any ideas?
You probably know already that TC has a "Fixed in Build" value?
I find it tricky to use because if we click 'build' once too often, the list of resolved issues gets all messed up.
Thus I'm also interested in expanding the feature, I just posted;
http://devnet.jetbrains.net/thread/438721
API to access "Fixed in Build" value?

TeamCity don't trigger automatic build

I'm dumb with continuous integration and noticed a behavior that does not seem right..
I'm using Mercurial with TeamCity. When I push changes the TeamCity detect the changes but don't run the build automatically. This is correct behavior? He should not detect the changes and run the build automatically?
Triggers are not added to build configurations by default in TeamCity. You'll need to go to the settings for the configuration and click on "Build Triggers" then "Add Trigger". The type of trigger I believe you are looking for is a "VCS Trigger".
The documentation for this feature can be found here.
I believe my issues was misunderstanding what was needed in Branch Filters. I thought I was supposed to enter the GIT refs I wanted to have builds triggered from
This wasn't working for me
+:refs/heads/*
-:refs/heads/releases/6.7.3
-:refs/heads/releases/6.8.30
-:refs/heads/releases/6.8.32
-:refs/heads/releases/6.8.34
And this is what finally figured out (I think) is that it is asking for the branch names inside TeamCity itself (the help text says "Newline-delimited set of rules in the form of +|-:logical branch name")
This worked for me, to trigger builds from the branch (GIT ref refs/heads/master for me, look back in your VCS Root setup) and all other branches except those labeled "releases/6.7.3", "releases/6.8.30", "releases/6.8.32" and "releases/6.8.34"
+:*
-:releases/6.7.3
-:releases/6.8.30
-:releases/6.8.32
-:releases/6.8.34

Resources