Welcome to mirror list, hosted at ThFree Co, Russian Federation.

hierarchy.rb « widgets « work_items « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 930aced8aceb9819999991783370a1c5e6c11bdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module WorkItems
  module Widgets
    class Hierarchy < Base
      def parent
        return unless work_item.project.work_items_feature_flag_enabled?

        work_item.work_item_parent
      end

      def children
        return WorkItem.none unless work_item.project.work_items_feature_flag_enabled?

        work_item.work_item_children
      end
    end
  end
end