It's all about the answers!

Ask a question

Operation Advisor - Custom Precondition for Work Items


Phillip Piper (15812524) | asked Sep 29 '11, 3:58 p.m.
edited Aug 03 '12, 7:28 p.m. by Jared Burns (4.5k29)
I am just starting with extending our RTC server. I downloaded the SDK and started reviewing the following links:
https://jazz.net/wiki/bin/view/Main/CustomPreconditionFollowup
https://jazz.net/library/article/495/

What I would like to do is require that change sets have been delivered prior to transitioning a work item to a specific state. I thought this could be achieved via an extension to the com.ibm.team.workitem.operation.workItemSave operation ID.

There are aspects of this that I'd like to model off existing preconditions. Is there a way to pull the existing precondition code to review? I am not sure if they are in the source that comes with the SDK or where it would be located.

Also, is there any article that discusses custom preconditions which modify the UI? I'd like people to be able to select states similar to the "Prevent Editing" precondition.

Finally, on another note, it might be nice if RTC provided a plug-in template which could be used for different ways to extend it.

Anyway, I'll take any assistance from anybody that has coded up their own custom preconditions. Thanks in advance.

Accepted answer


13 other answers



permanent link
Phillip Piper (15812524) | answered Nov 16 '11, 10:30 a.m.
Ralph,

Thanks so much for this information. I reviewed the extensions workshop and I found a lot of helpful information. I think it's the most comprehensive thing I've read so far.

Just some feedback:
1. I think this path is helpful at the conclusion of the workshop to include additional sample code that can be downloaded for review. Something like a series of example preconditions and followups for a few common classes you may be using with a paragraph description of each. No need to step through everything but at least it provides an additional template to start from.
2. I am not sure I understand how I can determine exactly what services I require for what I want to do.

My struggle is that currently I want to do something which I believe is probably fairly simple but I get stuck on a few questions.

To be more specific, we currently require an associated work item to deliver a change set. Now I want to create another condition that further verifies the type and state of that associated work item before you can deliver.
However, I am not sure of what applies from the workshop because:
1. I am not sure what services I require
2. I don't know #1 partly because the lab covered a different operationID and because it was a followup not a precondition

I think any examples for deliver (server) preconditions may be helpful to me here as a result.

permanent link
Phillip Piper (15812524) | answered Oct 10 '11, 10:02 a.m.
Hi Philip,

you might also want to have a look at the Extensions workshop in the library. It is for 3.0 and I am in the process of upgrading it, but it is still helpfull to understand the setup for development.


Ralph, thanks. I take a look in the coming days here and see if I am still having problems.

permanent link
Ralph Schoon (63.1k33646) | answered Oct 07 '11, 12:57 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Philip,

you might also want to have a look at the Extensions workshop in the library. It is for 3.0 and I am in the process of upgrading it, but it is still helpfull to understand the setup for development.

permanent link
Phillip Piper (15812524) | answered Sep 30 '11, 10:02 a.m.
I think I figured out some of this based on the video in Part 1 at this link:
https://jazz.net/wiki/bin/view/Main/RTCSDK20_ProcessPreConditionExample

This was extremely helpful to me in terms of finding how to search the source, etc. It may have been obvious to everyone else but it wasn't to me since I only found binaries when I looked at the SDK on the file system.

I was able to locate the existing precondition source code. This information also seemed to be missing from the other articles I saw.

I think it would be extremely helpful to merge and streamline the precondition articles or setup. It seems like each article has its own environment setup instructions along with the SDK having their own as well. I've had to read a number of articles and have had trouble determining which steps I need to follow.

Your answer


Register or 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.