It's all about the answers!

Ask a question

How to find change set(s) submitted for review?

Vinod Kumar (9612010) | asked Jan 14 '13, 1:11 a.m.
Is there any way to programatically find the change set(s) submitted for review for a specific user using RTC4 SDK?

One answer

permanent link
Ralph Schoon (62.3k33643) | answered Jan 14 '13, 8:06 a.m.
Hi Vinod,

what you are trying to achieve?

Based on not really understanding your use case, the easiest way to get the work items that are pending approval is using a query. You can do that also using the API. You can also use an Expression that you dynamically create and run that using the API. There are more API examples in the blog that is subject to the links in this answer, that might be interesting for you.

Vinod Kumar commented Jan 16 '13, 1:53 a.m.

Hi Ralph,
Thanks for the reply. What exactly I'm trying to achieve is to show the change set(s) submitted for a review in an Eclipse View in the user's RTC Client to which the change set(s) have come for review in a tree view structure. These change sets then could be expanded to show the changed files and then on right click on the file, I want to open the file in a custom editor.

Ralph Schoon commented Jan 16 '13, 8:34 a.m.

Hi Vinod,

this 'cherry picking' is only partially supported today. You can run a query e.g. recently approved work items. You can then open each work item. You can select the completed change sets associated with the work item and accept them into your loaded repository workspace to cherry pick.

As an alternative, you can use Search->Jazz Source Control->Locate change set.
In the lower section you select your repository workspace. In the upper section you add the work items you are interested in. If you have a parent for all the work items you are interested, you can add that.

You can search which change sets are not in your workspace. For each one you want, you can open it in the change explorer and accept it into your workspace to cherry pick.

Please be aware that you might have created gaps because changesets are not necessarily separated by files and might depend on each other. This will be detected and you will have to deal with it. You can also only accept completed change sets. 

Ralph Schoon commented Jan 16 '13, 8:40 a.m.

As a second thought, you could probably create some kind of automation using the API. This post shows a little bit of the Server API likely to be involved:

There are other posts on how to use queries and expressions for automation too, for example

There are some example snippets in the plain java client libraries you can start with. However, this is probably not a small effort.

Your answer

Register or to post your answer.