Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to modify the link type between two Work Items on action DONE

RTC 4.0.2

I have a Story with a linked child Task.  I would like to "change" the relation between the Task and the Story during action DONE.

I know how to do the change in the process to have a script running during an action DONE, but I do not know how to get the link, remove it and create a new one using JAVA

Any example would be appreciated
Thank you
erwin

 

0 votes


Accepted answer

Permanent link
You have to code a Java Participant that removes the old link and creates a new one. See https://rsjazz.wordpress.com/ for API examples and participant examples. This is across several posts, but it should be easy enough to find using the search window.
Erwin Kunz selected this answer as the correct answer

0 votes

Comments

 See also https://jazz.net/library/article/1229

(Discovering Links Between Items)

ILinkManager has methods like: createLink and createLink)

Thanks.
Eric

I always forget to look at your blog..
Thanks Ralph,  I'll check you page and come back if I'm not able to do it :-)

I there now way to do it in Java Script as Scripted-based Calculated Value... like I did to enforce Remaining work to 0?

No.



The reason is JavaScript does not allow you to follow relationships. The JavaScript API does not know about links. Sorry.

Where you could look into could be http://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/. Not sure if you could do that in Java. The Java API you have available there is a bit richer, but still limited compared to a follow up action.

You have not to be sorry :-)
Me as old perl developer would have preferred to use Scripted-based stuff

There are discussions about API's provided. The issue is that if you wanted to use Perl, you would have to use REST/OSLC API's.
There are also discussions about making the JavaScript API richer.
But there is also a concern with respect to performance and users customize their tools so much that they render them unusable (and then blame the product).

Since the server API is in Java you have a lot more API available (dependent on the extension point). In addition you can also debug that relatively easy once you got through https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/ .

My personal experience with scripting is that I like it as much as embedded c development without debugger back in the 80's.   8-)

Hi Ralph
How about just deleting the link to the Parent? Would that be possible with Scripted Based calculation

No this is also not accessible.Links are in general not accessible in Java Script, neither create, nor delete or follow.

showing 5 of 9 show 4 more comments

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,030

Question asked: Jun 27 '13, 11:36 a.m.

Question was seen: 5,660 times

Last updated: Jul 03 '13, 8:00 a.m.

Confirmation Cancel Confirm