Re: Web API: How to get the review id from the perforce change list number?

2013-02-27 Thread Steve
Perfect!  Thank you Raja.

On Wednesday, February 27, 2013 8:53:10 AM UTC-8, Raja wrote:
>
> You can add a status=submitted to the query string, so something like
> api/review-requests?changenum=$changelist&status=submitted
>
> should get you the Submitted Requests. Same holds for "discarded" status 
> as well. The default is "pending", which is why you dont see the other 
> requests. I dont see a way to enter multiple status-es, maybe file an 
> enhancement request for that?
>
> Regards
> Raja
>
>
>
> On Wed, Feb 27, 2013 at 9:32 PM, Steve  >wrote:
>
>> For some reason my initial post got mangled. Here it is again in briefer 
>> form:
>>
>> I need to be able to query the Web API to get the RB ID given a perforce 
>> change list number.  With the 1.0 API, this url works:
>>
>> api/json/reviewrequests/repository/$repo/changenum/$changelist
>>
>> With the 2.0 API, I've tried this:
>>
>> api/review-requests?changenum=$changelist
>>
>> This works for open reviews, but I get an empty review_requests list back 
>> when a review has been marked as submitted.  Is there some way I can do 
>> this for submitted reviews? Some other url that I'm missing?
>>
>> Thanks
>>
>> --Steve
>>
>>
>>
>> On Wednesday, February 27, 2013 7:52:35 AM UTC-8, Steve wrote:
>>>
>>>  We have a perforce trigger that looks at the submitted change list number 
>>> and makes an API call to review board to see if there is a corresponding 
>>> review. If found, the url for the review is added to the submitted change 
>>> list.  Using the Web API 1.0, we use this url
>>>
>>> api/json/reviewrequests/**repository/$repo/changenum/$**changelist
>>>
>>> which works fine. I need to port this code to Web API 2.0.  Using this url:
>>>
>>> api/review-requests?changenum=**$changelist
>>>
>>> works for open reviews, but not for reviews that have been marked as 
>>> submitted.  I get back a review request structure, but the  
>>> 'review_requests' list, which is where the id number is found,  is empty.  
>>> Is there some way I can get the review board id from a change list number 
>>> for a review marked as submitted? Perhaps a different url that I'm missing?
>>>
>>>
>>> --Steve
>>>
>>>  -- 
>> Want to help the Review Board project? Donate today at 
>> http://www.reviewboard.org/donate/
>> Happy user? Let us know at http://www.reviewboard.org/users/
>> -~--~~~~--~~--~--~---
>> To unsubscribe from this group, send email to 
>> reviewboard...@googlegroups.com 
>> For more options, visit this group at 
>> http://groups.google.com/group/reviewboard?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "reviewboard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to reviewboard...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Web API: How to get the review id from the perforce change list number?

2013-02-27 Thread Raja
You can add a status=submitted to the query string, so something like
api/review-requests?changenum=$changelist&status=submitted

should get you the Submitted Requests. Same holds for "discarded" status as
well. The default is "pending", which is why you dont see the other
requests. I dont see a way to enter multiple status-es, maybe file an
enhancement request for that?

Regards
Raja



On Wed, Feb 27, 2013 at 9:32 PM, Steve  wrote:

> For some reason my initial post got mangled. Here it is again in briefer
> form:
>
> I need to be able to query the Web API to get the RB ID given a perforce
> change list number.  With the 1.0 API, this url works:
>
> api/json/reviewrequests/repository/$repo/changenum/$changelist
>
> With the 2.0 API, I've tried this:
>
> api/review-requests?changenum=$changelist
>
> This works for open reviews, but I get an empty review_requests list back
> when a review has been marked as submitted.  Is there some way I can do
> this for submitted reviews? Some other url that I'm missing?
>
> Thanks
>
> --Steve
>
>
>
> On Wednesday, February 27, 2013 7:52:35 AM UTC-8, Steve wrote:
>>
>>  We have a perforce trigger that looks at the submitted change list number 
>> and makes an API call to review board to see if there is a corresponding 
>> review. If found, the url for the review is added to the submitted change 
>> list.  Using the Web API 1.0, we use this url
>>
>> api/json/reviewrequests/**repository/$repo/changenum/$**changelist
>>
>> which works fine. I need to port this code to Web API 2.0.  Using this url:
>>
>> api/review-requests?changenum=**$changelist
>>
>> works for open reviews, but not for reviews that have been marked as 
>> submitted.  I get back a review request structure, but the  
>> 'review_requests' list, which is where the id number is found,  is empty.  
>> Is there some way I can get the review board id from a change list number 
>> for a review marked as submitted? Perhaps a different url that I'm missing?
>>
>>
>> --Steve
>>
>>  --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~--~~~~--~~--~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Web API: How to get the review id from the perforce change list number?

2013-02-27 Thread Steve
For some reason my initial post got mangled. Here it is again in briefer 
form:

I need to be able to query the Web API to get the RB ID given a perforce 
change list number.  With the 1.0 API, this url works:

api/json/reviewrequests/repository/$repo/changenum/$changelist

With the 2.0 API, I've tried this:

api/review-requests?changenum=$changelist

This works for open reviews, but I get an empty review_requests list back 
when a review has been marked as submitted.  Is there some way I can do 
this for submitted reviews? Some other url that I'm missing?

Thanks

--Steve



On Wednesday, February 27, 2013 7:52:35 AM UTC-8, Steve wrote:
>
>  We have a perforce trigger that looks at the submitted change list number 
> and makes an API call to review board to see if there is a corresponding 
> review. If found, the url for the review is added to the submitted change 
> list.  Using the Web API 1.0, we use this url
>
> api/json/reviewrequests/repository/$repo/changenum/$changelist
>
> which works fine. I need to port this code to Web API 2.0.  Using this url:
>
> api/review-requests?changenum=$changelist
>
> works for open reviews, but not for reviews that have been marked as 
> submitted.  I get back a review request structure, but the  'review_requests' 
> list, which is where the id number is found,  is empty.  Is there some way I 
> can get the review board id from a change list number for a review marked as 
> submitted? Perhaps a different url that I'm missing?
>
>
> --Steve
>
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Web API: How to get the review id from the perforce change list number?

2013-02-27 Thread Steve
 

We have a perforce trigger that looks at the submitted change list number and 
makes an API call to review board to see if there is a corresponding review. If 
found, the url for the review is added to the submitted change list.  Using the 
Web API 1.0, we use this url

api/json/reviewrequests/repository/$repo/changenum/$changelist

which works fine. I need to port this code to Web API 2.0.  Using this url:

api/review-requests?changenum=$changelist

works for open reviews, but not for reviews that have been marked as submitted. 
 I get back a review request structure, but the  'review_requests' list, which 
is where the id number is found,  is empty.  Is there some way I can get the 
review board id from a change list number for a review marked as submitted? 
Perhaps a different url that I'm missing?


--Steve

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.