Skip to content
代码片段 群组 项目
提交 0f285847 编辑于 作者: Eugenia Grieff's avatar Eugenia Grieff
浏览文件

Remove valid epic check

Checking for each epic validatiy in
Issues::ExportCsvService is no longer needed
after migration that deleted invalida records.
Given it is an expensive check, we need to remove
it

Changelog: fixed
EE: true
上级 d00b7118
No related branches found
No related tags found
无相关合并请求
......@@ -26,9 +26,7 @@ def header_to_value_hash
def epic_issue_safe(attribute)
lambda do |issue|
epic = issue.epic
next if epic.nil?
next unless issue.epic_issue.valid? # TODO This check can be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/339514
epic[attribute]
end
......
......@@ -62,20 +62,4 @@ def csv
it_behaves_like 'including issues with epics'
end
end
context 'when epic issue is not valid' do
let(:epic) { create(:epic, group: group) }
before do
create(:epic_issue, issue: issue, epic: epic)
allow_next_instance_of(EpicIssue) do |epic_issue|
allow(epic_issue).to receive(:valid?).and_return(false)
end
end
it 'does not include epics information' do
expect(csv[0]).not_to have_key('Epic ID')
end
end
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册