Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign investigation #21

Open
borismod opened this issue Nov 22, 2015 · 1 comment
Open

Assign investigation #21

borismod opened this issue Nov 22, 2015 · 1 comment

Comments

@borismod
Copy link
Contributor

borismod commented Nov 22, 2015

As a developer I would like to be able to assign investigation on build or test

Test to reproduce

[Test]
public void AssignInvestigation_FluentBuildConfigurationAndUser_InvestigationAssigned()
{
   new RemoteTc(c => c.ToHost("HOST").AsGuest()).
          AssignInvestigation(
             buildConfiguration => buildConfiguration.Id("FluentTc"),
             user => user.Username("borismod")
}

Implementation tip

For TeamCity version prior to 2017.2 use the workaround as stated by @yaegor:

by tracing the browser requests on performing the action.
For me this gives:
POST /buildTypeInvestigationDialog.html?investigation-bt=&do-investigate=true&investigate=ASSIGN&investigator=&remove-investigation=<0 for "when fixed", 1 for "manually">&comment=<comment+text>

For TeamCity version starting with 2017.2 use the REST API as @yaegor wrote

Implemented POST to .../app/rest/investigations (accepts single investigation) and (as an experiment) to .../app/rest/investigations/multiple (accepts list of investigations). Also PUT allows to replace an investigation

For more details see related issue in TeamCity YouTrack: https://youtrack.jetbrains.com/issue/TW-24354

@borismod borismod added the ready label Dec 2, 2015
@borismod
Copy link
Contributor Author

borismod commented Dec 2, 2015

Details about the API: https://youtrack.jetbrains.com/issue/TW-24354

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant