Accessing Work Item Links in RTC-SDK?
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 link...so 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. Thanks! |
Accepted answer
I posted this extension here nov 2011.
see post 2. https://jazz.net/forum/questions/64268/operation-advisor-custom-precondition-for-work-items 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
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
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!
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.
https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes
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.
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.
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!'..