-
Notifications
You must be signed in to change notification settings - Fork 31
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
Get Iteration Start and End Dates, based on Iteration ID #120
Comments
Currently this is not possible, if you're interested: I think I can provide you a code snippet for your rule code, which can support you in getting the information. |
Please. If you can provide a code snipped to get the start and end dates from the iteration using the iterationid, which is already available, I would be able to solve this issue.
Thanks.
|
It is not nice in rule code, but it should do the work. You need
var clientCredentials = new VssBasicCredential("PAT", "<token>");
var devops = new VssConnection(new Uri("https://..."), clientCredentials);
var client = devops.GetClient<WorkItemTrackingHttpClient>();
var nodes = await client.GetClassificationNodesAsync("<teamproject name>", new []{ 11111 });
var node = nodes.Single(); then you can access e.g. var startDate = node.Attributes["startDate"] as string;
var finishDate = node.Attributes["finishDate"] as string; the string will look like that: "attributes": {
"startDate": "2017-03-22T00:00:00Z",
"finishDate": "2017-09-05T00:00:00Z"
}, |
Thanks. I'll try it out. |
please see the advanced examples there is an example with a method which get called several times in the rule |
It would be very nice to have these examples in the main documentation. Thanks again. |
Can I call multiple times, in the same rule, store.NewWorkItem? |
Sure, this is supported |
Feature Request
When the Work Item's iteration is changing, I need to update a custom field in the work item, with the new iteration's end date.
That means, I need to be able to read the start date and end date from the Iteration (if it is set for that iteration).
Is that possible now?
The text was updated successfully, but these errors were encountered: