プロジェクト

全般

プロフィール

Vote #68821

完了

paging mechanism returns the same last page forever

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
REST API_32
対象バージョン:
開始日:
2010/12/20
期日:
進捗率:

0%

予定工数:
category_id:
32
version_id:
20
issue_org_id:
7135
author_id:
7834
assigned_to_id:
1
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

I see something I believe is a bug in 1.0.4 version.

I'm trying to load all issues from Redmine using "page" and "per_page" parameters.
I don't see a way to understand which page was the last one because Redmine REST API keeps sending the same
page even when it should stop.

my request: get page 1 -> correct response.
my request: get page 2 -> correct response.
my request: get page 3 -> expected NO DATA because there should be 2 pages only, but Redmine resends the same last page (2) it returned before.

I'm attaching the log.
(I'm testing against Redmine on www.hostedredmine.org website. they have the last "1.0 stable" version)

I think the new paging mechanism (with limit and offset) should be integrated into 1.0* branch ASAP to solve these issues.

would be nice if someone could provide a valid example how to use paging with 1.0.4 version.


journals

minor correction: it actually returns the 1st page , not the last one at the step 3 I described above.
and the same page page1 is returned for all subsequent requests like "get page number4,5,6,..."
--------------------------------------------------------------------------------
This problem was not addressed at all in 1.0 and I don't want to merge all the required changes into 1.0-stable.
It will have to wait for version:1.1.0 which will be released at the very beginning of year 2011.

I'll add a topic on how to retreive objects collections in the API documentation.
--------------------------------------------------------------------------------
Fixed in r4571. The API will strictly respect the page parameter.
Exemple:

<pre>
GET /issues.xml?page=105

<issues type="array" total_count="2595" limit="25" offset="2600"/>
</pre>

Doc added here: [[Rest_api#Collection-resources-and-pagination|Rest_api#Collection-resources-and-pagination]]
--------------------------------------------------------------------------------

Admin Redmine さんがほぼ2年前に更新

  • カテゴリREST API_32 にセット
  • 対象バージョン1.1.0_20 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0