diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2022-06-16 21:43:58 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2022-06-16 21:43:58 +0000 |
commit | 1a3ee38c2e3ca077d3efb409567e0466bf1f1f41 (patch) | |
tree | 2d2646b60dbe8e66404670713fbb819ec141f2db /app/models/query.rb | |
parent | 04b91b35788eda8a751f8a27d7a8a4bdd47a6e21 (diff) | |
download | redmine-1a3ee38c2e3ca077d3efb409567e0466bf1f1f41.tar.gz redmine-1a3ee38c2e3ca077d3efb409567e0466bf1f1f41.zip |
Respect field visibility when showing associated issue fields (#37255).
Patch by Holger Just.
git-svn-id: https://svn.redmine.org/redmine/trunk@21645 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r-- | app/models/query.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index 0186cc379..7695bc165 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -113,7 +113,8 @@ class QueryAssociationColumn < QueryColumn end def value_object(object) - if assoc = object.send(@association) + assoc = object.send(@association) + if assoc && assoc.visible? assoc.send @attribute end end @@ -184,7 +185,8 @@ class QueryAssociationCustomFieldColumn < QueryCustomFieldColumn end def value_object(object) - if assoc = object.send(@association) + assoc = object.send(@association) + if assoc && assoc.visible? super(assoc) end end |