stack72 / TeamCitySharp

No Longer Maintained - please use https://github.com/mavezeau/TeamCitySharp
Other
200 stars 165 forks source link

Build.StatusText is not being populated #19

Open ghost opened 12 years ago

ghost commented 12 years ago

Hi

This might be a local problem or a problem related to EasyHttp/JsonFx. But for some reason the Property StatusText is not populated when I inspect my Build objects. If I take a look at the actual REST call and inspect the url in my browser I can see a value in . I'll have a closer look one of the next days, as this might just be a local problem.

Regards and thanks for the good work :)

stack72 commented 12 years ago

Hey

I have been following this one up. The issue here is that I use build locators and that only brings back partial data in comparison to other calls. This is now with the Jetbrains guys to see if it is fixable. I will update this with a resolution soon

Paul

manalidhotre commented 11 years ago

Is this issue fixed? I cannot retrieve Build.StatusText via TeamcitySharp

philjones88 commented 10 years ago

I am having this issue too, except it is much worse.

TeamCity 8.0.6, TeamCitySharp 0.3.5 (latest on nuget).

I get empty/null for changes, agent etc on build

spamandtuna commented 10 years ago

All Build object data is pulled from an XML file located at {server}/app/rest/builds/id:{buildId}. The problem is that only the <build> tag attributes are being populated in the object; child elements of that tag, like statusText, startDate, agent, etc. are being ignored. I don't know why that is, but I used the following C# code as a workaround. I'm currently using it for statusText, but it should be adaptable for the others as well.

Good luck!

XmlReader xmlr = new XmlTextReader("http://teamcity" + build.Href);

while (xmlr.Read())
     if (xmlr.Name.Equals("statusText") && xmlr.NodeType.ToString().Equals("Element"))
          build.StatusText = xmlr.ReadElementContentAsString();