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

Want to get full change history of source code (without limitation of 100)

Hello,
I try to get the full change history of a source code file. We use RTC 4.0.1.
In the beginning I used the service that the RTC Webclient uses (IScmRestService#history) but it limits every result to 100 changes.
Later I found out, that there is a IScmRestService2#historyPlus service, which I can pass a parameter for the number of results, but you guessed it.... it's also limited to 100. I can pass parameters under 100 and they are accepted, but the maximum is 100.

So I asked some developers and they told me that the service I try to call is exclusively for the Webclient, so I'm struggling now with the service for the clients. The method is called IScmRichClientRestService#getItemHistory.

In the source code IScmRichClientRestService.java I see that I have to give these parameters:

-contextItemNamespace;
-contextItemType
-contextItemId
-componentItemId
-versionableItemNamespace
-versionableItemType
-versionableItemId

I try to call it like this:
https://xxxx.com:9445/jazz/service/com.ibm.team.scm.common.rest.IScmRichClientRestService/itemHistory?contextItemId=_7HsRsTvYEeOkSJ3RlXQrBQ&versionableItemType=com.ibm.team.filesystem.FileItem&versionableItemId=_-xoDMDuFEeCneON3DJueNg&componentItemId=_hGuj0DNyEeCeJNSDhXtNkg&contextItemNamespace=com.ibm.team.scm&versionableItemNamespace=com.ibm.team.scm&contextItemType=Workspace


I also tried to change the method to getitemHistory or just history, but it didn't change sth., I always get 500 Internal Server Error response. If I use POST instead of GET it returns 400 - Bad Request

Later I saw this defect https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=214396
and it says that even this service limits it to 100, I couldn't test it so far, because I couldn't manage to pass the parameters correctly.

But RTC Eclipse is able to show the full change history. Are there any information how I can call the method that the RTC Eclipse Client calls?

Thanks in Advance!

0 votes


Accepted answer

Permanent link
Hi Oguzhan, I looked at your URL and I think you have two things wrong.
versionableItemNamespace=com.ibm.team.filesystem (not com.ibm.team.scm)
versionableItemType=FileItem (not com.ibm.team.filesystem.FileItem)
Does that work?
Oguzhan Yigit selected this answer as the correct answer

0 votes

Comments

Unfortunately not,

my request now:

https://xxxx.com:9445/jazz/service/com.ibm.team.scm.common.rest.IScmRichClientRestService/itemHistory?contextItemId=7HsRsTvYEeOkSJ3RlXQrBQ&versionableItemType=FileItem&versionableItemId=-xoDMDuFEeCneON3DJueNg&componentItemId=_hGuj0DNyEeCeJNSDhXtNkg&contextItemNamespace=com.ibm.team.scm&versionableItemNamespace=com.ibm.team.scm&contextItemType=Workspace

You didn't change your versionableItemNamespace yet. It needs to be com.ibm.team.filesystem. You are still using com.ibm.team.scm.

Ahhh now it works!

But after I passed the parameter "desiredPagesize=200" it still only shows the last 100.

My Request:

https://xxxx.com:9445/jazz/service/com.ibm.team.scm.common.rest.IScmRichClientRestService/itemHistory?contextItemId=7HsRsTvYEeOkSJ3RlXQrBQ&versionableItemType=FileItem&versionableItemId=-xp4YDuFEeCneON3DJueNg&componentItemId=_hGuj0DNyEeCeJNSDhXtNkg&contextItemNamespace=com.ibm.team.scm&versionableItemNamespace=com.ibm.team.filesystem&contextItemType=Workspace&desiredPageSize=200

Can't I call the service that the Eclipse Client calls to show the history? Do you have further information on this?

I think the rest api call DOES call the same service in the server.. the BUG is that the parameter for
response size is not applied to the actual data request.

What Sam said...

showing 5 of 7 show 2 more comments

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,937
× 1,202
× 479

Question asked: Nov 07 '13, 10:10 a.m.

Question was seen: 7,001 times

Last updated: Nov 08 '13, 8:46 a.m.

Confirmation Cancel Confirm