It's all about the answers!

Ask a question

Custom link definitions


Kunal Doddanavar (45222532) | asked Feb 04 '14, 7:18 a.m.

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 ?


Currently RTC does not provide any controls on what linktypes are allowed for what endpoint workitem types.  There is an enhancement request to provide this function:

https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/160162

Thanks

Kunal


Comments
sam detweiler commented Feb 04 '14, 9:43 a.m.

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

Accepted answer


permanent link
Ralph Schoon (61.6k33643) | 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


Register or to post your answer.