debian-mirror-gitlab/app/models/work_items/widgets/hierarchy.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
401 B
Ruby
Raw Normal View History

2022-07-23 23:45:48 +05:30
# frozen_string_literal: true
module WorkItems
module Widgets
class Hierarchy < Base
def parent
2022-08-13 15:12:31 +05:30
return unless work_item.project.work_items_feature_flag_enabled?
2022-07-23 23:45:48 +05:30
work_item.work_item_parent
end
def children
2022-08-13 15:12:31 +05:30
return WorkItem.none unless work_item.project.work_items_feature_flag_enabled?
2022-07-23 23:45:48 +05:30
work_item.work_item_children
end
end
end
end