Commit c6562608 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 66690c55 5de212ae
...@@ -56,7 +56,7 @@ module Issuable ...@@ -56,7 +56,7 @@ module Issuable
end end
def copy_resource_weight_events def copy_resource_weight_events
return unless original_entity.respond_to?(:resource_weight_events) return unless both_respond_to?(:resource_weight_events)
copy_events(ResourceWeightEvent.table_name, original_entity.resource_weight_events) do |event| copy_events(ResourceWeightEvent.table_name, original_entity.resource_weight_events) do |event|
event.attributes event.attributes
......
...@@ -101,11 +101,11 @@ ...@@ -101,11 +101,11 @@
= sprite_icon('download') = sprite_icon('download')
- if can?(current_user, :update_build, job) - if can?(current_user, :update_build, job)
- if job.active? - if job.active?
= link_to cancel_project_job_path(job.project, job, continue: { to: request.fullpath }), method: :post, title: _('Cancel'), class: 'btn btn-build' do = link_to cancel_project_job_path(job.project, job, continue: { to: request.fullpath }), method: :post, title: _('Cancel'), class: 'btn gl-button btn-build' do
= sprite_icon('close') = sprite_icon('close')
- elsif job.scheduled? - elsif job.scheduled?
.btn-group .btn-group
.btn.btn-default{ disabled: true } .btn.gl-button.btn-default{ disabled: true }
= sprite_icon('planning') = sprite_icon('planning')
%time.js-remaining-time{ datetime: job.scheduled_at.utc.iso8601 } %time.js-remaining-time{ datetime: job.scheduled_at.utc.iso8601 }
= duration_in_numbers(job.execute_in) = duration_in_numbers(job.execute_in)
...@@ -113,17 +113,17 @@ ...@@ -113,17 +113,17 @@
= link_to play_project_job_path(job.project, job, return_to: request.original_url), = link_to play_project_job_path(job.project, job, return_to: request.original_url),
method: :post, method: :post,
title: s_('DelayedJobs|Start now'), title: s_('DelayedJobs|Start now'),
class: 'btn btn-default btn-build has-tooltip', class: 'btn gl-button btn-default btn-build has-tooltip',
data: { confirm: confirmation_message } do data: { confirm: confirmation_message } do
= sprite_icon('play') = sprite_icon('play')
= link_to unschedule_project_job_path(job.project, job, return_to: request.original_url), = link_to unschedule_project_job_path(job.project, job, return_to: request.original_url),
method: :post, method: :post,
title: s_('DelayedJobs|Unschedule'), title: s_('DelayedJobs|Unschedule'),
class: 'btn btn-default btn-build has-tooltip' do class: 'btn gl-button btn-default btn-build has-tooltip' do
= sprite_icon('time-out') = sprite_icon('time-out')
- elsif allow_retry - elsif allow_retry
- if job.playable? && !admin && can?(current_user, :update_build, job) - if job.playable? && !admin && can?(current_user, :update_build, job)
= link_to play_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Play'), class: 'btn btn-build' do = link_to play_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Play'), class: 'btn gl-button btn-build' do
= custom_icon('icon_play') = custom_icon('icon_play')
- elsif job.retryable? - elsif job.retryable?
= link_to retry_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Retry'), class: 'btn btn-build gl-button btn-icon btn-default' do = link_to retry_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Retry'), class: 'btn btn-build gl-button btn-icon btn-default' do
......
---
title: Apply GitLab UI button styles to HAML buttons app/views/projects/ci/builds
merge_request: 43728
author: Andrei Kyrnich @kyrnich
type: other
---
title: Do not try to copy issue weight events when promoting an issue to epic
merge_request: 43891
author:
type: fixed
...@@ -39,6 +39,16 @@ RSpec.describe Issuable::Clone::AttributesRewriter do ...@@ -39,6 +39,16 @@ RSpec.describe Issuable::Clone::AttributesRewriter do
subject.execute subject.execute
end end
end end
context 'when issue has weight events' do
it 'ignores copying weight events' do
create_list(:resource_weight_event, 2, issue: original_issue)
expect(subject).not_to receive(:copy_events).with(ResourceWeightEvent.table_name, any_args)
expect { subject.execute }.not_to change { ResourceWeightEvent.count }
end
end
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment