Skip to content

Commit

Permalink
Show 'failed to start' builds too - they're actually very important
Browse files Browse the repository at this point in the history
(BTW, strangely enough, TeamCity doesn't allow investigation on these)

Use a queryString filter as per [doc](https://confluence.jetbrains.com/display/TCD10/REST+API#RESTAPI-BuildLocator)
  • Loading branch information
zlamma committed Feb 10, 2018
1 parent eeaef2f commit ee2626c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Script/ViewModels/BuildScreenViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
function ajaxLastBuild(nonRunningOnly) {
return $.ajax({
dataType: "json",
url: Settings.restApiBaseUrl + '/builds?locator=running:'+(nonRunningOnly ? 'false' : 'any')+',buildType:(id:(' + branch.buildType.id + ')),branch(' + (branch.isNoBranchPlaceHolder ? 'branched:false' : ('name:(' + branch.name + ')')) + '),count:1&fields=build(id,buildTypeId,number,status,state,running,percentageComplete,branchName,href,webUrl,startDate,finishDate)' + Utils.getTsQSParam(),
url: Settings.restApiBaseUrl + '/builds?locator=running:'+(nonRunningOnly ? 'false' : 'any')+',failedToStart:any,buildType:(id:(' + branch.buildType.id + ')),branch(' + (branch.isNoBranchPlaceHolder ? 'branched:false' : ('name:(' + branch.name + ')')) + '),count:1&fields=build(id,buildTypeId,number,status,state,running,percentageComplete,branchName,href,webUrl,startDate,finishDate)' + Utils.getTsQSParam(),
xhrFields: { withCredentials: true }
});
}
Expand Down
2 changes: 1 addition & 1 deletion Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Settings.restApiBaseUrl = Settings.teamCityBaseUrl + '/' + authType + '/app/rest
Settings.buildTypesUrl = Settings.restApiBaseUrl + '/buildTypes';

function getBuildStatusUrlForBranch(branchName) {
return Settings.restApiBaseUrl + '/builds/branch:' + branchName + ',running:any,canceled:any';
return Settings.restApiBaseUrl + '/builds/branch:' + branchName + ',running:any,canceled:any,failedToStart:any';
}

function getBuildStatusUrlForBuildId(buildId) {
Expand Down

0 comments on commit ee2626c

Please sign in to comment.