diff options
author | Rémy Coutable <remy@rymai.me> | 2018-07-03 11:33:51 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-07-03 11:50:52 +0300 |
commit | 2b78f223123dbbeabafb8b5d07e367a5ebad4567 (patch) | |
tree | 1a82428f87b200efa4299963beafa0d9c0550b4e | |
parent | 48f4ccd31169555d66fed277f30f0001e9b18f4f (diff) |
Fix link to job when creating a new issue from a failed job
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r-- | app/serializers/build_details_entity.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/36907-fix-new-issue-link-from-failed-job.yml | 5 | ||||
-rw-r--r-- | spec/features/projects/jobs_spec.rb | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/app/serializers/build_details_entity.rb b/app/serializers/build_details_entity.rb index ca4480fe2b1..2de9624aed4 100644 --- a/app/serializers/build_details_entity.rb +++ b/app/serializers/build_details_entity.rb @@ -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 diff --git a/changelogs/unreleased/36907-fix-new-issue-link-from-failed-job.yml b/changelogs/unreleased/36907-fix-new-issue-link-from-failed-job.yml new file mode 100644 index 00000000000..80a50734f72 --- /dev/null +++ b/changelogs/unreleased/36907-fix-new-issue-link-from-failed-job.yml @@ -0,0 +1,5 @@ +--- +title: Fix link to job when creating a new issue from a failed job +merge_request: 20328 +author: +type: fixed diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb index d2aaf60e72c..d06abdd999b 100644 --- a/spec/features/projects/jobs_spec.rb +++ b/spec/features/projects/jobs_spec.rb @@ -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) |