プロジェクト

全般

プロフィール

Vote #76752

完了

REST API with JSON content missing attributes with false values

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

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

0%

予定工数:
category_id:
32
version_id:
142
issue_org_id:
20788
author_id:
129430
assigned_to_id:
1
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
100
ステータス-->[Closed]

説明

if an issue IS NOT private,using "GET /issues/.xml" can get "false" in the response;but if using "GET /issues/.json", there is no "is_private" key fonud in the response.

and the similar:
if a project IS NOT public,using "GET /projects/.xml" can get "false" in the response;but if using "GET /issues/.json", there is no "is_public" key fonud in the response.

Environment:
Redmine version 2.6.6.stable
Ruby version 2.0.0-p645 (2015-04-13) [x86_64-linux]
Rails version 3.2.22
Environment production
Database adapter Mysql2
SCM:
Subversion 1.7.10
Filesystem

Redmine plugins:
redmine_cas 1.2.1


journals

--------------------------------------------------------------------------------
JSON result was missing value of false or nil.

The reason is that we assume as 'true' the result of @[false].any?@ . However actual this result is 'false'.
https://ruby-doc.org/core/Enumerable.html#method-i-any-3F

I made a patch, and attach it.
--------------------------------------------------------------------------------
LGTM. Setting the target version to 3.3.9.
--------------------------------------------------------------------------------
Committed, thanks.
--------------------------------------------------------------------------------

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

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

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

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

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

いいね!0
いいね!0