Fix external issue tracker "Issues" link leading to 404s
a70431f874
modified the behavior to link to the external issue tracker
issues URL instead of the project path URL. This restores the
previous behavior.
Closes #21252, #21402
This commit is contained in:
parent
501b570dee
commit
ace38e8397
|
@ -34,6 +34,7 @@ v 8.11.3 (unreleased)
|
||||||
- Label list shows all issues (opened or closed) with that label
|
- Label list shows all issues (opened or closed) with that label
|
||||||
- Don't show resolve conflicts link before MR status is updated
|
- Don't show resolve conflicts link before MR status is updated
|
||||||
- Don't prevent viewing the MR when git refs for conflicts can't be found on disk
|
- Don't prevent viewing the MR when git refs for conflicts can't be found on disk
|
||||||
|
- Fix external issue tracker "Issues" link leading to 404s
|
||||||
|
|
||||||
v 8.11.2
|
v 8.11.2
|
||||||
- Show "Create Merge Request" widget for push events to fork projects on the source project. !5978
|
- Show "Create Merge Request" widget for push events to fork projects on the source project. !5978
|
||||||
|
|
|
@ -212,7 +212,7 @@ class Projects::IssuesController < Projects::ApplicationController
|
||||||
if action_name == 'new'
|
if action_name == 'new'
|
||||||
redirect_to external.new_issue_path
|
redirect_to external.new_issue_path
|
||||||
else
|
else
|
||||||
redirect_to external.issues_url
|
redirect_to external.project_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,13 @@ describe Projects::IssuesController do
|
||||||
describe "GET #index" do
|
describe "GET #index" do
|
||||||
context 'external issue tracker' do
|
context 'external issue tracker' do
|
||||||
it 'redirects to the external issue tracker' do
|
it 'redirects to the external issue tracker' do
|
||||||
external = double(issues_url: 'https://example.com/issues')
|
external = double(project_path: 'https://example.com/project')
|
||||||
allow(project).to receive(:external_issue_tracker).and_return(external)
|
allow(project).to receive(:external_issue_tracker).and_return(external)
|
||||||
controller.instance_variable_set(:@project, project)
|
controller.instance_variable_set(:@project, project)
|
||||||
|
|
||||||
get :index, namespace_id: project.namespace.path, project_id: project
|
get :index, namespace_id: project.namespace.path, project_id: project
|
||||||
|
|
||||||
expect(response).to redirect_to('https://example.com/issues')
|
expect(response).to redirect_to('https://example.com/project')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue