diff options
author | Jarka Košanová <jarka@gitlab.com> | 2018-09-22 10:07:20 +0200 |
---|---|---|
committer | Jarka Košanová <jarka@gitlab.com> | 2018-10-04 10:22:00 +0200 |
commit | c0e9eb0eaca198f5ae12d6bd693ddcd705f79369 (patch) | |
tree | 5b7f5f0750c6c5d54745cd8e142c5d95e6f3c5d1 /lib | |
parent | 2243e4d4ca4bbd96a05059d463d283d468a3fc57 (diff) | |
download | gitlab-ce-c0e9eb0eaca198f5ae12d6bd693ddcd705f79369.tar.gz |
Support short reference to group entities from project entitiesce-7287-epic-references
- add a direct project parent (group) to Banzai context
- if an epic is referenced from a direct descendant
-> change epic to_reference to use short reference
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/epic_reference_filter.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/banzai/filter/epic_reference_filter.rb b/lib/banzai/filter/epic_reference_filter.rb index e06e2fb3870..26bcf5c04b4 100644 --- a/lib/banzai/filter/epic_reference_filter.rb +++ b/lib/banzai/filter/epic_reference_filter.rb @@ -9,6 +9,12 @@ module Banzai def self.object_class Epic end + + private + + def group + context[:group] || context[:project]&.group + end end end end |