It's all about the answers!

Ask a question

perl module for RTC/RQM/RRC?

Buzz Moschetti (7625) | asked May 31 '12, 8:14 a.m.
Has anyone tried to put together a perl module(s) for programmatic interaction with Jazz/RTC?

Buzz Moschetti commented Jan 09 '13, 10:51 p.m.

Hey everyone:  check out the Lyo perl that we're working on:

THis is the master URL:

Buzz Moschetti commented Jan 26 '13, 5:56 p.m.

If anyone is watching this thread, how does this look to you?

use CLM2;

my $clm = new CLM2("machine", "port", "user", "password");

my $cmpa = $clm->getCMProjectArea('Demo Lifecycle Project(Change Management)');

   query() returns a list of ID, content pairs:

   (id1, taskForID1, id2, taskForID2, id3, taskForID3, ...)

my @idPairs = $cmpa->query( { ownedBy => 'd15921s' } );

for my $id (@idPairs) {
    my $tsk = shift @idPairs;

    #  Get and bump due dates:
    my $dd = $tsk->getDueDatetime();  # "2013-01-26T02:01:48.667Z"

    my $dd2 = myDateUtil.addBizDays($dd, 14);  # not part of CLM; no need


    $rc = $cmpa->update($id, $tsk);
Looks interesting?   Join the Lyo development effort!

sam detweiler commented Jan 27 '13, 7:22 a.m.

looks interesting.. not sure I understand the comment

   query() returns a list of ID, content pairs:

   (id1, taskForID1, id2, taskForID2, id3, taskForID3, ...)

it should just return a collection of content objects.. one element of the object is the id.

so $tsk->id should be = 1 or 43565 or whatever the workitem id is.
$tsk->type = workitem type..

you will have to be careful to avoid workitem attribute name collisions.
type above might be a custom attribute name, so $tsk->workitem_type might be a better content attribute element name for that field

Buzz Moschetti commented Jan 27 '13, 2:09 p.m.

I am experimenting with keeping content and keys separate so that real value semantics can be applied to tasks, reqs, etc., and also to keep behaviors and functions symmetric.   Here's how a task is created:
my $cmpa = $clm->getCMProjectArea('Demo Lifecycle Project(Change Management)');
my $tsk = $cmpa->vendTask();
$tsk->setTitle("I am The Title");
Now at this point, the task has not been created.   There is no ID.  But then...
my $id = $cmpa->create($tsk);
The $id is an object associated with task.   It is relevant in the DB domain; the task does not have to be and can have relevance solely in the code domain.   We're following const arg conventions here so $tsk is not modified in the create() operation.  So the fetchOne method is "easy" because it takes an id and returns the task object associated with it.   But query() can return more than one AND the query params might not have ID.   So it is forced to return id-task pairs.

sam detweiler commented Jan 27 '13, 5:39 p.m.

sorry, don't understand your terminology 'task'.. in RTC everything is a workitem.

there IS a task workitem, but I don't think that is what you are referencing..

Buzz Moschetti commented Jan 27 '13, 7:07 p.m.

Yep, it's all workitems.   Some are tasks, some are defects, etc.  The subtle thing is that a workitem can exist as an object before it is actually inserted/created.   Thus, we have to keep a WorkItem object separate from the key that can fetch it from a persistor.

Hoping this starts to get people engaged in the Lyo perl effort.

sam detweiler commented Jan 27 '13, 8:09 p.m.

so, isn't that just a state of the workitem? (saved) committed or not..

save as internal.. create an object, populate the fields (not ID as its not relevant prior to save) Save.  If save fails, then ID is updated as is created date/by, etc..

so again, I don't understand word task, and ID is irrelevant.. object state matters, new, saved, dirty, not dirty.

showing 5 of 7 show 2 more comments

2 answers

permanent link
Buzz Moschetti (7625) | answered May 31 '12, 4:02 p.m.
The vagaries of forms vs. basic auth , the blur of XML namespaces, and non-symmetry of ccm, qm, and rm services are driving me to this sort of thing.

use CLM;

$clm = new CLM("");

$clm->auth("name", "password");


$workItem = $clm->getWorkItem("3651");

print Dumper($workItem);

$workItem->set("owner", $newOwnerCode):


permanent link
sam detweiler (12.5k6195201) | answered Jun 01 '12, 8:42 a.m.
sounds interesting, but the native api is only available in Java.

you can wrapper REST access, but much of the function is not available thru REST.

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.