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

Query regarding scm commandline tool

Hello,
Usecase :
We are planning to get details of code review (for all the task linked with delivery workitem) , so here we are using command from scm command line
"lscm export code-review -u ****** -P ****** -r https://<host server>/ccm -W 1438655,1438623,1438574,1438572,1438570,1438556,1438489,1438468,1438187,1438169 -j D:\ALM\CLI\response.json"

Now here our query is how many workitem separated by comma we can pass
-> is there any certain limit? (upto 20 , 30,....)
-> if yes, what solution you can give here?

Thanks

Answering to Ralph's comment (Due to word limit i am unable to post comment)
Hello Ralph,
Thanks for addressing my question , i hope you also went through my second question which co-related with this question, hope at least my both the question question is clear

So i will first touch on what is our business problem :
The main of purpose of this is to give overall summary of Code Review like No. of Issues , How many are fixed for given Delivery , as you are aware of latest changes which was done in ELM 7.x , the UI of code review section was changed ,along with which our existing tool which was doing the job to generate the report got deprecated and now we are again trying to re-gain the working functionality of the tool , basically we are providing all data of code review like (Code Reviewers, status, code review status , review cycle ,no. of files modified,....) under a csv file which further on taken up by respective team to perform their process

Now how our tool works :
I never mentioned that i am trying to fetch the list of all task from repository ,my tool flow is quite simple
Go to Delivery workitem -> fetch the linked change request -> iterate through each Change request and get the linked story -> iterate through each story and get the list of task now once i have the complete list of task here just to shorten the execution time (my second question comes into the picture) here  from the list then we will identify which workitem has code review and which workitem does not , workitem that have code review we furthur store it in some collection and then we will pass the list of task worktiem(now here it could be 10 task or 100 task as well depending upon development team how many implementation task they have created for the given delivery) separated by comma as scm command to get json which we will further parse into readable csv format

Hope i clarified my point :)



0 votes

Comments

If you intent to iterate all work items of a project area or the repository, I would suggest to better forget that. Again, what is the purpose of this whole endeavor. Why do you want to do this and what is the business problem that you try to solve. 

Hello Ralph,
I have edited my question , please have a look
Thank you


Accepted answer

Permanent link
Here my 2 € cents.

I have looked into EWM and I can use "Code Review Exists" as a condition in a work item query. 

I did an OSLC GET on a work item with a code review and the information is stored as a link:    

<rtc_cm:com.ibm.team.filesystem.reviews.linktype.codereview.com.ibm.team.filesystem.reviews.link.codereview rdf:resource="https://elm.example.com:9443/ccm/resource/itemOid/com.ibm.team.filesystem.reviews.CodeReview/_c9fMAKXHEeyN1IrEopKV3Q" />

Following the link would reveal more information. See my blog series on OSLC and REST in the links above.

I was able to find the code review in the links to add it to the displayed columns in the query. This would allow to get the data in a CSV, including the links. https://rsjazz.wordpress.com/2022/03/01/ewm-rest-api-to-access-existing-work-item-queries/ explains how to get a CSV using the REST APIs

I searched the EWM SDK for code review and found a query model (see https://rsjazz.wordpress.com/2017/02/14/query-models-or-how-to-find-stuff-with-the-rtc-api/ ) for code reviews, but that is internal.

I looked into the report builder but was unable to find a simple way to report on code reviews. This is certainly worth an enhancement request. 

What information you can retrieve from a code review link in the EWM Java API would require some additional work.

I would likely not use the EWM SCM Command Line referred to in this question to collect data on code reviews. I do not know if there is a limitation on the command line, but as a developer I would consider it a best practice to limit the amount of arguments e.g. lets say 50 at a time and automate the process to retrieve data in batches, if I decided to use it.

Rajat Krishnan selected this answer as the correct answer

0 votes

Comments

I did an OSLC GET on the code review URI and got a whole bunch of information back that could be used to further analyze the data. At first glance, I only got the data back as JSON and not as RDF+XML which I would expect to be the default. This was just a small test and I did not look into it deeper. Anyway, if you really wanted to get the information that would be a way.

I forgot to mention that I had a quick look at the reportable REST API (see https://rsjazz.wordpress.com/2022/03/02/ewm-reportable-rest-api/ ) but did not find Code Review as object. This would be another Enhancement request I would consider. 

1 vote

Thanks for this info
Namaste!!

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
× 12,019
× 7,495
× 1,325
× 158

Question asked: Mar 16 '22, 6:11 a.m.

Question was seen: 1,234 times

Last updated: Mar 21 '22, 1:27 a.m.

Confirmation Cancel Confirm