Forum Discussion

conti's avatar
conti
New Contributor
9 years ago

Is there a way to get a list of all ongoing reviews using the command line client ccollab?

Hello community,

 

I want to integrate our corporate tools with code collaborator. I need a way to get a list of all ongoing reviews using the command line client. How ever I can't find a command working for me. And when I try the wget I get the login page printed on the console.

We use the version ccollab v9.4.9400

 

Greetings,

Simon

  • AlexeyKryuchkov's avatar
    AlexeyKryuchkov
    SmartBear Alumni (Retired)

    Hi,

     

    I don't see a direct way to do this. A possible (but not very elegant) solution will be creating two batch files. The first one should execute the admin review edit ask command and redirect its output to a file (or probably a variable):  

    ccollab admin review edit ask > reviews.txt

    In the middle of the output, there will be a list of ongoing reviews, so it will be possible to parse it and collect the IDs. However, it is not sufficient to just run this batch file as such a command will require user input. To work around this, run the second batch file instead:

    start getreviews.bat
    timeout /t 10
    taskkill /F /IM ccollab.exe

    It runs the first batch file and terminates the ccollab client after the output is saved.

     

     

    • conti's avatar
      conti
      New Contributor

      Hello Alexey,

       

      Thank you very much!

      It seems I get a very short list using the ask command:

       

      Reviews you can upload to:
      Review #310: "TestCMD"
      Review #537: "nochntest"
      Review #646: "cmdlinereview"
      Review #670: "213072:1: Review Another Test by scripting"
      Review #671: "213072:1: Review Another Test by scripting"
      Review #672: "Untitled Review"
      Review #265: "Untitled Review"
      Review #267: "Untitled Review"
      Review #219: "EEE Code Review"
      Review #674: "418211:1: Review Another Test by scripting"
      Review #222: "test"
      Review #865: "59787:24: Review 59787:24: Auto-created Review for CR 59787"
      Review #866: "59787:24: Review 59787:24: Auto-created Review for CR 59787"
      Review #869: "59787:24: Review Auto-created Review for CR 59787"
      Review #942: "Auto-created review for CR 436866"

       

      >

       

      But when I open the Web GUI I get a much longer list with around 80-90 reviews which are all open.

      Is there a way to get all open reviews?

       

      Best regards,

      Simon

      • AlexeyKryuchkov's avatar
        AlexeyKryuchkov
        SmartBear Alumni (Retired)

        Hi,

         

        Probably, you need to concentrate on the wget approach. The fact that you get the login page in console should mean that the command line client is not authorized to view what you request. So, check the following:

        1. Make sure that ccollab is logged in to the server as a user who can view the report.
        2. Make sure that the relative URL is correct. Probably, it will be better to query a report in the CSV format. To get a relative link for such a report, generate a report from web UI find the link that exports to CSV.
        3. Check if the login page will be in the output is if you execute a simple command like

        ccollab admin wget ui