REST API: Requesting Issues while sorting provides same result regardless of start offset

thedillonb avatarthedillonb created an issue

I am running the following command and receiving the same result for start = 0, 1, 2, or 3. When I do start=4 it finally switches to a different result. Please see attachment for detailed output. This only happens when sorting and requesting by offset.

curl -i -u thedillonb:* "https://api.bitbucket.org/1.0/repositories/thedillonb/bitbucketbrowser/issues?sort=status&start=0&limit=1"

curl -i -u thedillonb:* "https://api.bitbucket.org/1.0/repositories/thedillonb/bitbucketbrowser/issues?sort=status&start=1&limit=1"

curl -i -u thedillonb:* "https://api.bitbucket.org/1.0/repositories/thedillonb/bitbucketbrowser/issues?sort=status&start=2&limit=1"

curl -i -u thedillonb:* "https://api.bitbucket.org/1.0/repositories/thedillonb/bitbucketbrowser/issues?sort=status&start=3&limit=1"

All four above returns the same issue:

{ "count": 26, "filter": {}, "search": null, "issues": [ { "status": "new", "priority": "trivial", "title": "Good", "reported_by": { "username": "thedillonb", "first_name": "Dillon", "last_name": "", "is_team": false, "avatar": "https://secure.gravatar.com/avatar/5ce4051edf2dd7a41c0d9f438f869b1a?d=https%3A%2F%2Fdwz7u9t8u8usb.cloudfront.net%2Fm%2Fa1fb05d05bb7%2Fimg%2Fdefault_avatar%2F32%2Fuser_blue.png&s=32", "resource_uri": "/1.0/users/thedillonb" }, "utc_last_updated": "2012-11-15 08:09:10+00:00", "comment_count": 0, "metadata": { "kind": "bug", "version": null, "component": null, "milestone": null }, "content": "", "created_on": "2012-11-15 09:09:10", "local_id": 22, "follower_count": 0, "utc_created_on": "2012-11-15 08:09:10+00:00", "resource_uri": "/1.0/repositories/thedillonb/bitbucketbrowser/issues/22", "is_spam": false } ] }

Comments (3)

  1. thedillonb

    Also, if I increase the limit to, say 2, (while start=0) I get the correct 2 results. However, if I then do another request when start=2, I get a duplicate result I got in my first request...

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.