rosario linking om framework naren datha. rosario link types customizable work item link types with...

15
Rosario Linking OM Framework Naren Datha

Upload: jaclyn-strudwick

Post on 31-Mar-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Rosario Linking OM Framework

Naren Datha

Page 2: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Rosario link types• Customizable work item link types with rich query abilities and rules to represent topologies• Comes with built-in link types such as

– Parent/Child for tree hierarchy links– Predecessor/Successor link types

Page 3: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Link type topologies• Topology assigns a set of rules to link types.

Network Link types of this topology have essentially no rules and no directionality. You can have circular relationships, and the link looks the same from both sides.

Directed NetworkLink types of this topology are like Network links, except there is directionality. You can specify a name that appears at each end of the link. In other words, the link looks differently depending from which side you view it.

DependencyLink types of this topology are like Directed Network links in that they have directionality, but an additional constraint to prevent circular relationships.

TreeLink types of this topology are essentially trees, it enforces a one-to-many relationship and doesn’t allow circularity.

Page 4: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Creating new Link Types

• Decide which topology to use• New WitAdmin utility. Link options:

– ExportLinkType– ImportLinkType– ListLinkTypes– DeactivateLinkType– ReactivateLinkType

• Create xml file for linktype definition. Example:<LinkTypes> <LinkType ReferenceName=“MyCompany.LinkTypes.MyTree"

ForwardName=“My Child" ReverseName=“My Parent" Topology="Tree" />

</LinkTypes>

• Run “WitAdmin ImportLinkType”

Page 5: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Getting work item linktypes in OM• Work item link types are defined per server• WorkItemStore.WorkItemLinkTypes has list of registered linktypes

Page 6: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Accessing links in a workitem

• Each work item has 2 collections: WorkItemLinks for current links and WorkItemLinkHistory for add/remove history

• Important properties of Link object:– SourceId, TargetId– AddedDate, RemovedDate

Page 7: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Creating and Deleting links

Page 8: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Querying links from UI

Page 9: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Query for links - WIQL

SELECT [System.Id], [System.Links.LinkType], [System.Title]

FROM WorkItemLinksWHERE

mode(MustContain)

([Source].[System.TeamProject] = @project)

And (System.Links.LinkType = 'System.LinkTypes.Related')

And ([Target].[System.WorkItemType] = 'Task')

Page 10: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Running link query

• Use query class in object model

Page 11: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Using results of link query

TargetId SourceId

1 -111 1111 1112 1

121 12122 1213 1

Output from results Tree representation of results

Hierarchical data is returned as SourceId, TargetId pairs. TargetId is id for the result, and SourceId is source of link such as Parent. Below diagram shows how tree can be visualized from result list results on the left

Page 12: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

How the tree is constructed on VSIP client?

Target Id

Source Id

1 -1

11 1

111 11

12 1

101 12

102 12

13 1

index

Parent index

Level

0 -1 0

1 1 1

2 11 2

3 1 1

4 12 2

5 12 2

6 1 0

From Server Computed in client Drawing on paint event

Page 13: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Result list view

Page 14: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Paging work items

• Our result list can handle large number of items because it pages the items from server as user scrolls

• “Query” function in WorkItemStore can be used for paging specified Ids and specified Fields from server.

Example Usage:

Page 15: Rosario Linking OM Framework Naren Datha. Rosario link types Customizable work item link types with rich query abilities and rules to represent topologies

Customizing Links Control

-Multiple links controls can be hosted in a form with each control showing specified set of link types-Links control now can show customized columns-Links are grouped by link types