You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 6, 2019. It is now read-only.
having link to last revision of workitem
var Last = self.LastRevision
try to get access to Parent in order to get linked WI
var parent = Last.Parent
Rule example:
<rule name="TakeLastParent" appliesTo="Bug,Product Backlog Item">
<![CDATA[
if (!self.HasParent())
{var sum = 0.0;
var parentFeature = self.LastRevision.Parent;
sum = parentFeature.Children.Where(c => ((string)c["System.WorkItemType"])=="Bug" || ((string)c["System.WorkItemType"])=="Product Backlog Item").Sum(c => c.GetField<double>("Microsoft.VSTS.Scheduling.Effort",0.0));
parentFeature.Fields["Microsoft.VSTS.Scheduling.Effort"].Value = sum;
}
]]>
</rule>
Expected Result:
code is compiled and provide access to Parent WI if that exists including access to fields and values Actual Result:
following error is thrown by console app:
[Error] 04.774 Error CS1061 in script 'TakeLastParent' at line 5, column 42: 'Aggregator.Core.Interfaces.IRevision' does not contain a definition for 'Parent' and no extension method 'Parent' accepting a first argument of type 'Aggregator.Core.Interfaces.IRevision' could be found (are you missing a using directive or an assembly reference?)
Environment:
TFS 2017 U2 On Premise - TFS Aggregator Server Plugin 2.3 RC1
The text was updated successfully, but these errors were encountered:
OHh I remember... In the object model that link collection is of yet another type than the standard link collection, which is why I had decided not to add it when we added link support and revision support.
Steps to Reproduce:
var Last = self.LastRevision
var parent = Last.Parent
Rule example:
Expected Result:
code is compiled and provide access to Parent WI if that exists including access to fields and values
Actual Result:
following error is thrown by console app:
[Error] 04.774 Error CS1061 in script 'TakeLastParent' at line 5, column 42: 'Aggregator.Core.Interfaces.IRevision' does not contain a definition for 'Parent' and no extension method 'Parent' accepting a first argument of type 'Aggregator.Core.Interfaces.IRevision' could be found (are you missing a using directive or an assembly reference?)
Environment:
TFS 2017 U2 On Premise - TFS Aggregator Server Plugin 2.3 RC1
The text was updated successfully, but these errors were encountered: