Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to use JAVA api to get latest build status

Hi everyone, now we try to use the following JAVA API to get the latest build status,

List buildResults = teamRepository.itemManager().fetchPartialItems(queryPage.getItemHandles(),
IItemManager.DEFAULT, Arrays.asList(properties), monitor);

but the obtained results are delayed compare with the results directly seen from eclipse client.
for example, the build status in eclipse client is already "complete", but the build status obtain from api is still "in progress"

Do you have any idea about this issue, should I refresh anything and then retrieve the build status?

0 votes



2 answers

Permanent link
for example, the build status in eclipse client is already "complete", but the build status obtain from api is still "in progress"

Reading the Javadoc comment for IItemManager (see the source code in the SDK) it says this:

The first time a client asks for the shared item for a particular item, the item manager fetches the current state of the item from the repository... When the item manager is subsequently asked for the shared item for the same particular item, it returns the shared item without contacting the server.

There's two possibilities though. First is a REFRESH property on IItemManager. Try changing IItemManager.DEFAULT to this property. There's also a refreshSharedItems method that looks to be used for bulk scenarios of potentially different shared item types (I dunno).

0 votes


Permanent link
for example, the build status in eclipse client is already "complete", but the build status obtain from api is still "in progress"

Reading the Javadoc comment for IItemManager (see the source code in the SDK) it says this:

The first time a client asks for the shared item for a particular item, the item manager fetches the current state of the item from the repository... When the item manager is subsequently asked for the shared item for the same particular item, it returns the shared item without contacting the server.

There's two possibilities though. First is a REFRESH property on IItemManager. Try changing IItemManager.DEFAULT to this property. There's also a refreshSharedItems method that looks to be used for bulk scenarios of potentially different shared item types (I dunno).

thanks for the feedback, it helps!

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,926

Question asked: Jul 22 '11, 6:12 a.m.

Question was seen: 6,409 times

Last updated: Jul 22 '11, 6:12 a.m.

Confirmation Cancel Confirm