It's all about the answers!

Ask a question

Accessing Work Item Links in RTC-SDK?

Dave Evans (1382140) | asked Jan 02 '14, 4:13 p.m.

What objects do I need to access a linked work item's status from within the RTC-SDK?

Context: I am making a precondition which will prevent one work item from being closed when it's blocker has not been closed yet. This is technically identical to the out-of-the-box "All Children Resolved" precondition, except for the Blocks that we can have several work items which block a single one whereas only one parent link can be used.

My skill level: I have had several successes with making simple preconditions before, but am still new to the subject so a more in-depth explanation would be much appreciated.


Dave Evans commented Jan 02 '14, 4:37 p.m. | edited Jan 02 '14, 4:38 p.m.

You should make this an answer so I can select it :).

Wow, it's worse than I ever imagined! Being new to this and coming from a world of VB.Net simplicity I am feeling like I've gotten in way over my head...

So, I need to use the IAuditableCommon of the valid ISaveParameter object passed in there... and use the getAuditableCommon method to determine if the IReference of the valid returned ...oh forget it, I'm not going to bother explaining it in plain English. Only a Java developer would think this way :). I was laughing earlier today when I saw the name of the method you had to use to make an editor inform you it had unsaved changes: setDirty! I've got a lot to learn!

Thank you!

sam detweiler commented Jan 02 '14, 4:49 p.m. | edited Jan 02 '14, 5:15 p.m.

yes, this is an object oriented system. methods everywhere. AND to minimize storage space, handles to objects are used, but the handle doesn't contain any data, and the data isn't stored in one place, so you have to fetch the data (resolve the object)

and here is another sample, which dumps out workitems, attribute type info and links and attachment info, the accepted answer.  I just added the links/attachments info.

also, you have to think of this system in a change mgmt perspective. you would want to be able to 'audit' changes (see the change history) to any object.  thus these are 'auditables'. there are some you wouldn't want to audit, those external to the system.. file system, or symbolic links..

then u need services to manipulate the grown up objects based on these.

repository,  workitem, contributor (user), ...

then you look at the services and see there are some that are client side only
some that are server side only, and some that are common to both.

Dave Evans commented Jan 02 '14, 5:09 p.m.

Thank you! I'm sure I'll get to know the important objects well and learn where the methods are. But I keep feeling like what Ralph says in his article on setting up the development environment... "stuck in your village 1000 or more years ago, with no map and the task to explore and conquer the world." It is certainly getting better quickly, thanks to everyone's help.

sam detweiler commented Jan 02 '14, 5:18 p.m.

I am not a professional developer. I do this cause I like to. so my experience is all self taught. learning the eclipse dev environment is incredibly powerful, and daunting. adding the jazz operational processes on top of the eclipse and java models sometimes is 'doah!' and others 'whoa!'..

Accepted answer

permanent link
sam detweiler (12.5k6189201) | answered Jan 02 '14, 4:18 p.m.
edited Jan 02 '14, 5:48 p.m.
I posted this extension here nov 2011.
see post 2.

this one checks if the workitem is going into a closed state group, then finds if there is a depends link, gets the other end and checks if it is in its closed group too.
if not, then it adds an error to be displayed
Dave Evans selected this answer as the correct answer

Your answer

Register or to post your answer.