Vote #76752
完了REST API with JSON content missing attributes with false values
0%
説明
if an issue IS NOT private,using "GET /issues/
and the similar:
if a project IS NOT public,using "GET /projects/
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.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------