Skip to content
This repository was archived by the owner on Jan 6, 2019. It is now read-only.
This repository was archived by the owner on Jan 6, 2019. It is now read-only.

Parent property isn't exposed for LastRevision access to WI #2

Closed
@yan95g

Description

@yan95g

Steps to Reproduce:

  1. having link to last revision of workitem
    var Last = self.LastRevision
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions