My script doing following steps

call post-review

At this point i expect the Review id get generated hence i try to fetch the
review id through change number below routine
call subroutine to get_review_request_by_changenum which does

         self.myurl = self.rbserver +
'/api/review-requests/?changenum=%s&repository=1' % changenum
         self.urlopen = self.opener.open(self.myurl)
         self.result = simplejson.load(self.urlopen)
         if self.result['stat'] == "ok":
            self.dict = self.result['review_request']
            return self.dict
        else:
            return

But self.dict does not contains id.


On Fri, Dec 2, 2011 at 2:31 PM, Christian Hammond <chip...@chipx86.com>wrote:

> I'm not entirely sure what the problem is. If your script is creating the
> review request, then the ID is coming back in the payload. If it's doing
> anything with the review request, you should have the ID.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
>
>
> On Thu, Dec 1, 2011 at 8:28 PM, jack jack <jais...@gmail.com> wrote:
>
>> Hi Chris,
>>
>> You are right the review request isn't publish, But what if i want to get
>> review id before publishing.?
>>
>> The behavior of getting review id before publishing was working for
>> Reviewboard version 1.0 api, hence we were able to get the review id before
>> publishing easily, how to do that now, I have noticed that once i publish
>> the review request from RB GUI my script in second time works properly, but
>> in that case its two step process which is incorrect for the user.
>>
>> Also i have logged in properly my script.
>>
>> Regards,
>> Jack
>>
>>
>> On Fri, Dec 2, 2011 at 2:45 AM, Christian Hammond <chip...@gmail.com>wrote:
>>
>>> Hi,
>>>
>>> First off, please email the list only and not me directly. I won't
>>> respond to direct emails any faster than the list.
>>>
>>> The problem is likely that the review request isn't published and the
>>> script you're writing isn't logged in as a user that can see it. You'll
>>> need to authenticate first.
>>>
>>> Christian
>>>
>>>
>>>
>>> On Dec 1, 2011, at 5:57, jack jack <jais...@gmail.com> wrote:
>>>
>>> Once the posting review request is complete
>>>
>>> I am trying to get review id from changelist number.
>>>
>>> So i am trying following URL get the review id
>>>
>>>
>>> http://xxx.xxxxoftware.com/xxxx/api/review-requests/?changenum=127061&repository=1
>>>
>>> Which shows me XML output which contains the review id as '4'
>>>
>>> but when i pass the
>>>
>>>                 self.myurl = self.rbserver +
>>> '/api/review-requests/?changenum=%s&repository=1' % changenum
>>>                 self.urlopen = self.opener.open(self.myurl)
>>>                 self.result = simplejson.load(self.urlopen)
>>>
>>> my self.result contains empty data
>>>
>>> http://xxxxx.xxxxxftware.com/xxxx/r/4/
>>> {u'total_results': 0, u'stat': u'ok', u*'review_requests': []*,
>>> u'links': {u'self': {u'href': u'
>>> http://xxxxx.xxxxoftware.com/xxxx/api/review-requests/?changenum=127738&repository=1',
>>> u'method': u'GET'}, u'create': {u'href': u'
>>> http://xxxxx.xxxxoftware.com/xxxx/api/review-requests/', u'method':
>>> u'POST'}}}
>>>
>>> Can you somebody help me what i am missing here, it might possible i am
>>> missing very basic thing here as i am not good in Json etc.
>>>
>>> Thanks in advance.
>>>
>>>
>>>
>>> On Thu, Dec 1, 2011 at 6:02 PM, jack jack <jais...@gmail.com> wrote:
>>>
>>>> Hi Chris,
>>>>
>>>> Sorry for sending you email in person, but it is very urgent.
>>>>
>>>> I posted a review request and i got the URL, is it mandatory that i
>>>> should publish the review request visiting the RB site then review id will
>>>> be available?
>>>>
>>>> because my wrapper is doing some task which tries to fetch the review
>>>> id after posting review request and while doing so i am getting error
>>>> message
>>>>
>>>> IndexError: list index out of range
>>>>
>>>> But when i publish the review request and re post the request i did not
>>>> see error message.
>>>>
>>>> Regards,
>>>> jack
>>>>
>>>>
>>>>
>>>  --
>>> 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
>>>
>>>  --
>>> 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
>>
>>
>>  --
>> 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
>>
>
>  --
> 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
>

-- 
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

Reply via email to