提交 848097b5 编写于 作者: S Sean McGivern

Merge branch 'fix/sm/35931-active-ci-pipelineschedule-have-nullified-next_run_at' into 'master'

Fix "pipeline_schedules pages throwing error 500" when "Active Ci::PipelineSchedule have a nullified `next_run_at`"

Closes #32790

See merge request !13286
......@@ -15,7 +15,7 @@
- else
= s_("PipelineSchedules|None")
%td.next-run-cell
- if pipeline_schedule.active?
- if pipeline_schedule.active? && pipeline_schedule.next_run_at
= time_ago_with_tooltip(pipeline_schedule.real_next_run)
- else
= s_("PipelineSchedules|Inactive")
......
---
title: Fix pipeline_schedules pages when active schedule has an abnormal state
merge_request: 13286
author:
......@@ -219,6 +219,25 @@ feature 'Pipeline Schedules', :js do
end
end
end
context 'when active is true and next_run_at is NULL' do
background do
create(:ci_pipeline_schedule, project: project, owner: user).tap do |pipeline_schedule|
pipeline_schedule.update_attribute(:cron, nil) # Consequently next_run_at will be nil
end
end
scenario 'user edit and recover the problematic pipeline schedule' do
visit_pipelines_schedules
find(".content-list .pipeline-schedule-table-row:nth-child(1) .btn-group a[title='Edit']").click
fill_in 'schedule_cron', with: '* 1 2 3 4'
click_button 'Save pipeline schedule'
page.within('.pipeline-schedule-table-row:nth-child(1)') do
expect(page).to have_css(".next-run-cell time")
end
end
end
end
context 'logged in as non-member' do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册