プロジェクト

全般

プロフィール

Vote #78371

完了

Revert API change in spent_hours field in issue#show

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

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

0%

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

説明

When preloading the @spent_hours@ of issues (as e.g. done for #20661, they default to @0@ instead of the previous default @0.0@. This results in a change of the @issue#show@ API which now also returns an Integer instead of a Float. Previously (in Redmine 3.2), the API used to return the data the following way:


{
  "issue": {
    "id": 15,
    ...
    "spent_hours": 0.0,
    ...
  }
}

While later versions (including the current trunk) return them as follows:


{
  "issue": {
    "id": 15,
    ...
    "spent_hours": 0,
    ...
  }
}

This appears to break strict API clients which expect a float there. In our tests, this change appears to break the current Android version of RedminePM, probably due to some internal type exceptions. The attached patch was extracted from "Planio":https://plan.io/redmine-hosting and fixes this behavior. With it, we follow the previous behavior of always sending Floats.


journals

Patch committed with an API test, thanks.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,20661,Show visible spent time link for users allowed to view time entries.

Admin Redmine さんが3年以上前に更新

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

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

いいね!0
いいね!0