Custom link definitions
Hi, At RTC 4.0.2, I have defined a customlinks project, that contains also a "one to many" association. The custom link works quite well when I link a "child" Work Item to a "mother" one, in fact when I try to attach a different "Mother Entity" the new entity replaces the old one. Unfortunately the same doesn't happen when, from a "mother" work item, I try to associate new "children" work items: when I associate a new child work item already associated to a different mother work item, I would expect that the old association would be broken and the new comes on. What really happens is that the child entity gets associated to two mother entities, despite the association is defined with a 0..1 multiplicity. Here's a snippet of the custom link definition. <extension point="com.ibm.team.repository.common.linkTypes"> <linkType constrained="false" id="it.enel.clm.atena.customlinks.entitafiglia" internal="false"> <source> <endpoint displayName="Esigenza Madre" id="esigenzamadre" multiplicity="0..1"> <itemReferenceType itemTypeName="WorkItem" packageURI="com.ibm.team.workitem"/> </endpoint> </source> <target> <endpoint displayName="Entità Figlia" id="entitafiglia" multiplicity="0..n"> <itemReferenceType itemTypeName="WorkItem" packageURI="com.ibm.team.workitem"/> </endpoint> </target> </linkType> </extension> -------------------------------------------------------------------------------------------------------- I searched Jazz.net and found an Enhancement Request and wish to know if this is the reason for the behavior noticed by users ?
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/160162
Thanks Kunal |
Accepted answer
Ralph Schoon (63.5k●3●36●46)
| answered Feb 10 '14, 3:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am not sure if there is a built in rule that makes 0..n Links work. What you could do is create an advisor that prevents saving if there are more than one links to the "parent".
Kunal Doddanavar selected this answer as the correct answer
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
I don't know the answer, but how does your linktype compare to the Parent/child, where a child can have 0..1 parents, but never more.
I don't think this is related to the ER u mention which was about trying to limit a speciflc link type to a specific workitem type. Today Linktypes are system wide global for all workitems types. I had developed a prototype for 160162