Commit 391710f2 authored by Kamil Trzciński (OoO till 3th)'s avatar Kamil Trzciński (OoO till 3th)
Browse files

Merge branch '47040-inconsistent-job-list-in-job-details-view' into 'master'

Resolve "Inconsistent job list in job details view"

Closes #47040

See merge request gitlab-org/gitlab-ce!20243
parents 5714e57b 1d3dbe46
......@@ -44,12 +44,10 @@ def cancel_all
def show
@builds = @project.pipelines
@pipeline = @build.pipeline
@builds = @pipeline.builds
.order('id DESC')
.present(current_user: current_user)
@pipeline = @build.pipeline
respond_to do |format|
title: Show jobs from same pipeline in sidebar in job details view.
merge_request: 20243
type: fixed
......@@ -102,6 +102,8 @@ def get_index(**extra_params)
describe 'GET show' do
let!(:job) { create(:ci_build, :failed, pipeline: pipeline) }
let!(:second_job) { create(:ci_build, :failed, pipeline: pipeline) }
let!(:third_job) { create(:ci_build, :failed) }
context 'when requesting HTML' do
context 'when job exists' do
......@@ -113,6 +115,13 @@ def get_index(**extra_params)
expect(response).to have_gitlab_http_status(:ok)
expect(assigns(:build).id).to eq(
it 'has the correct build collection' do
builds = assigns(:builds).map(&:id)
expect(builds).to include(,
expect(builds).not_to include(
context 'when job does not exist' do
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