Issue 3405 in reviewboard: The Next link in API response is wrong for non-standard queries for review requests

2014-06-05 Thread reviewboard

Status: New
Owner: 
Labels: Type-Defect Priority-Medium

New issue 3405 by rafal.wo...@gmail.com: The Next link in API response is  
wrong for non-standard queries for review requests

http://code.google.com/p/reviewboard/issues/detail?id=3405

*** READ THIS BEFORE POSTING!
***
*** You must complete this form in its entirety, or your bug report will be
rejected.
***
*** For customer support, please post to reviewbo...@googlegroups.com
***
*** If you have a patch, please submit it to
http://reviews.reviewboard.org/
***
*** Do not post confidential information in this bug report!


What version are you running?
1.7.22

What's the URL of the page containing the problem?
/api/review-requests/

What steps will reproduce the problem?
1. Produce large amount of review requests on RB and mark as submitted most  
of them

2. Ask REST API for those requests, for submitted only in example
3. Try to use the NEXT link and watch the result

What is the expected output? What do you see instead?
List of review requests returned by API was expected. I got empty answer.

What operating system are you using? What browser?
RB serwer is on Ubuntu 12.04. API tests were made with cURL.

Please provide any additional information below.

As I noticed, by default REST API returns only open review requests. So for  
query:
wget -q -O - --header=Authorization: Basic $PassToken --header=Accept:  
application/xml http://*/api/review-requests/?max-results=200;


I would get only - in example - 13 open requests. It may be considered as a  
bug, because documentation for the API (  
http://www.reviewboard.org/docs/manual/1.7/webapi/2.0/resources/review-request-list/  
) says:


By default, this returns all published or formerly published review  
requests.


But let's leave it for a while. Fixing it will not fix the following  
problem. If I send an API request:


wget -q -O - --header=Authorization: Basic $PassToken --header=Accept:  
application/xml http://*/api/review-requests/?status=allmax-results=200;


and there are more than 200 results to return, I will get following NEXT  
link:


  next
   hrefhttp://*/api/review-requests/?start=200amp;max-results=200/href
   methodGET/method
  /next

As the previously given parameter status=all is missing in the NEXT link,  
API will return bad answer.


Asking for requests with other ( i.e. submitted as below) status will  
produce the same problem:
wget -q -O - --header=Authorization: Basic $PassToken --header=Accept:  
application/xml http://*/api/review-requests/?status=submittedmax-results=20;


 links
  self

hrefhttp://*/api/review-requests/?status=submittedamp;max-results=20/href

   methodGET/method
  /self
  create
   hrefhttp://sackreviewboard.emea.nsn-net.net/api/review-requests//href
   methodPOST/method
  /create
  next
   hrefhttp://*/api/review-requests/?start=20amp;max-results=20/href
   methodGET/method
  /next
 /links

The response for given NEXT link will be empty, because status=submitted is  
missing:


rsp
 total_results12/total_results
 statok/stat
 review_requests
  array
  /array
 /review_requests
 links
  self
   hrefhttp://*/api/review-requests/?start=20amp;max-results=20/href
   methodGET/method
  /self
  prev
   hrefhttp://*/api/review-requests/?start=0amp;max-results=20/href
   methodGET/method
  /prev
  create
   hrefhttp://*/api/review-requests//href
   methodPOST/method
  /create
 /links


--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Issue 3405 in reviewboard: The Next link in API response is wrong for non-standard queries for review requests

2014-06-05 Thread reviewboard


Comment #1 on issue 3405 by rafal.wo...@gmail.com: The Next link in API  
response is wrong for non-standard queries for review requests

http://code.google.com/p/reviewboard/issues/detail?id=3405

Would you be so kind to remove our RB address from XML code above? It looks  
like I am not able to edit it myself.


--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Issue 3405 in reviewboard: The Next link in API response is wrong for non-standard queries for review requests

2014-06-05 Thread reviewboard

Updates:
Status: NeedInfo

Comment #2 on issue 3405 by trowb...@gmail.com: The Next link in API  
response is wrong for non-standard queries for review requests

http://code.google.com/p/reviewboard/issues/detail?id=3405

I'm also not able to edit it--I can only delete the entire thing. Would you  
like to me to do so?


This bug is a duplicate of 3199, and if you upgrade to the latest 1.7.x  
release or 2.0.x, it will be fixed.


--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Issue 3405 in reviewboard: The Next link in API response is wrong for non-standard queries for review requests

2014-06-05 Thread reviewboard


Comment #3 on issue 3405 by rafal.wo...@gmail.com: The Next link in API  
response is wrong for non-standard queries for review requests

http://code.google.com/p/reviewboard/issues/detail?id=3405

Yes, please delete this issue in that case and sorry for posting duplicated  
bug.


--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.