
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
My project need to trace all team member fixed change requests in one day. Because our starteam server does not enable MPX function,
so I want to use audit to locate which Change Request is modified.
My question is how i use below String to get ChangeRequest object.
Item 1 | Workspace Changes on 2014-04-08@07-23-47Z |
The API not document how to use below method to get ChangeRequest.
java.lang.String |
getInfo1Property()
returns auxiliary information for the first "operand" object (if any)
|
java.lang.String |
getInfo2Property()
returns auxiliary information for the second "operand" object (if any)
|
java.lang.String |
getInfo3Property()
returns auxiliary information for the third "operand" object (if any)
|
java.lang.String |
getItemClass1Name()
Returns the name of the audited item's type.
|
java.lang.String |
getItemClass2Name()
Returns the name of the second "operand" item's type (if any).
|
java.lang.String |
getItemClass3Name()
Returns the name of the third "operand" item's type (if any).
|
java.lang.String |
getItemDescriptor1()
Returns the primary descriptor for the underlying audited object.
|
java.lang.String |
getItemDescriptor2()
Returns the primary descriptor for the second "operand" object (if any).
|
java.lang.String |
getItemDescriptor3()
Returns the primary descriptor for the third "operand" object (if any).
|
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
>>our starteam server does not enable MPX function
why not? mpx is available with all starteam licensing.
the use of mpx in your organization would significantly reduce client server traffic on your network,
as well as reduced load on your StarTeam server.
>>so I want to use audit to locate which Change Request is modified.
The server generates audits for each artifact type and instance that is created/changed/deleted during any given session.
Look for Audits whose getItemClass1Name() returns "Change Request" and getEventID() returns Audit.EventID.MODIFIED. For these audits, the value of getInfo1Property() is a String, whose numeric value represents the numeric value of an equivalent ChangeNumber Property on a ChangeRequest in that view.
In other words,
ChangeRequest cr = view.getViewMembers(server.getTypes().CHANGE_REQUEST).find(audit.getInfo1Property()) will return the ChangeRequest represented by that Audit.
An alternative approach would be to 'poll' the view every 1/2 an hour (or some preconfigured time interval),
refresh the ChangeRequest collection, sort by last modified time, and pick all CRs that have been modified since your last poll. e.g. pseudocode below
ViewMemberCollection crs = view.getViewMembers(server.getTypes().CHANGE_REQUEST);
crs.getCache().refresh();
crs.sort(DateTimeSortable); // implement & provide your date time sorter
ChangeRequest[] cc = crs.toArray();
for each (ChangeRequest cr in cc) {
if (cr.getModifiedTime() > lastTimeIChecked && cc.getStatus().equalsa(ChangeRequest.Status.CLOSED))
do something...
}
After all, in the absence of MPX, you're going to need to poll something - either the audits or the ChangeRequests collections...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
>> If I submit a new change request, what kind of audit will be generated?
Apparently, both. I think CREATED implies the artifact is created in the server, ADDED implies the artifact is added to a folder/view.
>> Is there any method to get modified time file from audit?
No. You should always look at the file (any starteam artifact) for it's modified time property.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
>>our starteam server does not enable MPX function
why not? mpx is available with all starteam licensing.
the use of mpx in your organization would significantly reduce client server traffic on your network,
as well as reduced load on your StarTeam server.
>>so I want to use audit to locate which Change Request is modified.
The server generates audits for each artifact type and instance that is created/changed/deleted during any given session.
Look for Audits whose getItemClass1Name() returns "Change Request" and getEventID() returns Audit.EventID.MODIFIED. For these audits, the value of getInfo1Property() is a String, whose numeric value represents the numeric value of an equivalent ChangeNumber Property on a ChangeRequest in that view.
In other words,
ChangeRequest cr = view.getViewMembers(server.getTypes().CHANGE_REQUEST).find(audit.getInfo1Property()) will return the ChangeRequest represented by that Audit.
An alternative approach would be to 'poll' the view every 1/2 an hour (or some preconfigured time interval),
refresh the ChangeRequest collection, sort by last modified time, and pick all CRs that have been modified since your last poll. e.g. pseudocode below
ViewMemberCollection crs = view.getViewMembers(server.getTypes().CHANGE_REQUEST);
crs.getCache().refresh();
crs.sort(DateTimeSortable); // implement & provide your date time sorter
ChangeRequest[] cc = crs.toArray();
for each (ChangeRequest cr in cc) {
if (cr.getModifiedTime() > lastTimeIChecked && cc.getStatus().equalsa(ChangeRequest.Status.CLOSED))
do something...
}
After all, in the absence of MPX, you're going to need to poll something - either the audits or the ChangeRequests collections...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks for your answer.
Besides, I have two questions:
1. What are difference between Audit.EventID.ADDED and Audit.EventID.CREATED? If I submit a new change request, what kind of audit will be generated?
2. If user modify a file on starteam, the modified times of file and audit are different. Is there any method to get modified time file from audit?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
>> If I submit a new change request, what kind of audit will be generated?
Apparently, both. I think CREATED implies the artifact is created in the server, ADDED implies the artifact is added to a folder/view.
>> Is there any method to get modified time file from audit?
No. You should always look at the file (any starteam artifact) for it's modified time property.