It's all about the answers!

Ask a question

Prevent a WI -> WI link based on WIs type/attributes ?


Shlomit Shachor (361210) | asked Jun 21 '10, 4:20 a.m.
JAZZ DEVELOPER
Hi

I have added some new Link Types to RTC and I have a need to prevent the user from linking some WIs to other WIs based on:

- The source/target WIs type
- The value of the source/target WIs attributes

In the link def I use:
...
<itemReferenceType>
...

Is there a way to add more constraints here? if not then I guess I need to add code that would run when adding links - can I get some instructions on what class to use etc'?


Thanks in advance.

6 answers



permanent link
Patrick Streule (4.9k21) | answered Jun 21 '10, 8:15 a.m.
JAZZ DEVELOPER
I have added some new Link Types to RTC and I have a need to prevent
the user from linking some WIs to other WIs based on:

- The source/target WIs type
- The value of the source/target WIs attributes

In the link def I use:
..
itemReferenceType
..

Is there a way to add more constraints here? if not then I guess I
need to add code that would run when adding links - can I get some
instructions on what class to use etc'?

The type of constraints that you are describing cannot be configured out
of the box. An option would be to write your own precondition that
checks the custom constraints:

https://jazz.net/wiki/bin/view/Main/RTCSDK20_ProcessPreConditionExample

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Shlomit Shachor (361210) | answered Jun 22 '10, 11:05 a.m.
JAZZ DEVELOPER
Thank you, if I understand correctly only when the user press 'save' I will be able to check if the links are ok. I wanted to check this when the user does the "add link" - is that possible?

thanks

permanent link
Patrick Streule (4.9k21) | answered Jun 22 '10, 5:29 p.m.
JAZZ DEVELOPER
On 6/22/10 5:08 PM, shlomiti wrote:
Thank you, if I understand correctly only when the user press 'save' I
will be able to check if the links are ok. I wanted to check this when
the user does the "add link" - is that possible?

We don't provide the hooks that would allow you to prevent adding the
link in the first place.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Shlomit Shachor (361210) | answered Jul 06 '10, 1:00 p.m.
JAZZ DEVELOPER
Hi,

I was thinking then maybe to take a diff approach: add a menu action (available via right-mouse click on a WI) that will enable to add links. In such a menu action I know the WI type and can activate the action only for the allowed types.

Is it possible to add menu actions for WI via a standard extension point?

If so how?

If not )-:

thanks

permanent link
Patrick Streule (4.9k21) | answered Jul 12 '10, 2:01 p.m.
JAZZ DEVELOPER
I was thinking then maybe to take a diff approach: add a menu action
(available via right-mouse click on a WI) that will enable to add
links. In such a menu action I know the WI type and can activate the
action only for the allowed types.

Is it possible to add menu actions for WI via a standard extension
point?

Yes menu actions can be contributed using the regular Eclipse object
contribution mechanism. Register the object contribution for IWorkItem
or IWorkItemHandle.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Shlomit Shachor (361210) | answered Jul 14 '10, 7:12 a.m.
JAZZ DEVELOPER
Thanks, I need this ability in the web Interface, how can i add my actions for WI's in the Web client?

Thanks

Your answer


Register or to post your answer.