Fix link to job when creating a new issue from a failed job

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2018-07-03 10:33:51 +02:00
parent 48f4ccd311
commit 2b78f22312
No known key found for this signature in database
GPG Key ID: 98DFFD1C0C62B70B
3 changed files with 7 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class BuildDetailsEntity < JobEntity
def build_failed_issue_options
{ title: "Job Failed ##{build.id}",
description: "Job [##{build.id}](#{project_job_path(project, build)}) failed for #{build.sha}:\n" }
description: "Job [##{build.id}](#{project_job_url(project, build)}) failed for #{build.sha}:\n" }
end
def current_user

View File

@ -0,0 +1,5 @@
---
title: Fix link to job when creating a new issue from a failed job
merge_request: 20328
author:
type: fixed

View File

@ -165,7 +165,7 @@ feature 'Jobs', :clean_gitlab_redis_shared_state do
it 'links to issues/new with the title and description filled in' do
button_title = "Job Failed ##{job.id}"
job_url = project_job_path(project, job)
job_url = project_job_url(project, job, host: page.server.host, port: page.server.port)
options = { issue: { title: button_title, description: "Job [##{job.id}](#{job_url}) failed for #{job.sha}:\n" } }
href = new_project_issue_path(project, options)