Merge branch '54146-fix-calendar-query' into 'master'
Fix calendar feed when sorted by priority Closes #54146 See merge request gitlab-org/gitlab-ce!23870
This commit is contained in:
commit
ffef28ccd6
|
@ -3,7 +3,7 @@ cal.prodid = '-//GitLab//NONSGML GitLab//EN'
|
|||
cal.x_wr_calname = 'GitLab Issues'
|
||||
|
||||
# rubocop: disable CodeReuse/ActiveRecord
|
||||
@issues.includes(project: :namespace).each do |issue|
|
||||
@issues.preload(project: :namespace).each do |issue|
|
||||
cal.event do |event|
|
||||
event.dtstart = Icalendar::Values::Date.new(issue.due_date)
|
||||
event.summary = "#{issue.title} (in #{issue.project.full_path})"
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix project calendar feed when sorted by priority
|
||||
merge_request: 23870
|
||||
author:
|
||||
type: fixed
|
|
@ -72,5 +72,14 @@ describe 'Project Issues Calendar Feed' do
|
|||
expect(body).to have_text('TRANSP:TRANSPARENT')
|
||||
end
|
||||
end
|
||||
|
||||
context 'sorted by priority' do
|
||||
it 'renders calendar feed' do
|
||||
visit project_issues_path(project, :ics, sort: 'priority', feed_token: user.feed_token)
|
||||
|
||||
expect(response_headers['Content-Type']).to have_content('text/calendar')
|
||||
expect(body).to have_text('BEGIN:VCALENDAR')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue