tfsaggregator / aggregator-cli

A new version of Aggregator aiming at Azure DevOps (ex Visual Studio Team Services)
https://tfsaggregator.github.io/
Apache License 2.0
73 stars 32 forks source link

Allow querying "tested by" links #141

Closed denious closed 3 years ago

denious commented 4 years ago

Feature Request

I was trying to create a flow around User Story related Test Cases and automating QA work but could not find a way to query Test Cases and their states from the "links updated" event.

It would be great to have another property called TestedBy, for example, that would function the same way Children does right now.

me1986au commented 4 years ago

Hey Can you please bring back your blog for

blog.denious.net/azure-b2c-role-based-authorization-part-1/ blog.denious.net/azure-b2c-role-based-authorization-part-2/

or provide another way to get to it

giuliov commented 4 years ago

You can do this today with a rule like this

// assume self is a 'User Story'
var allTests = new List<string>();
foreach(var testedByLink in self.RelationLinks.Where(link => link.Rel == "Microsoft.VSTS.Common.TestedBy-Forward"))
{
    var testCase = store.GetWorkItem(testedByLink);
    allTests.Add( $"{testCase.Id.Value} - {testCase.Title}" );
}
return String.Join(",\r\n", allTests);

Maybe you ask for a convenience field that hides the string constant?

denious commented 3 years ago

Thanks, this is perfect! No need to hide the string, but some documentation (or a link to the official documentation) on which strings are available would've solved my problem. I simply couldn't figure out which relationship to use.