diff --git a/app/views/shared/empty_states/_issues.html.haml b/app/views/shared/empty_states/_issues.html.haml index 12d99c3ab4b..046b127f73c 100644 --- a/app/views/shared/empty_states/_issues.html.haml +++ b/app/views/shared/empty_states/_issues.html.haml @@ -20,4 +20,3 @@ - else .text-center %h4 There are no issues to show. - = link_to 'New issue', button_path, class: 'btn btn-new', title: 'New issue', id: 'new_issue_link' diff --git a/changelogs/unreleased/31384-new-issue-button-on-no-results-page-after-search-doesn-t-go-to-correct-form.yml b/changelogs/unreleased/31384-new-issue-button-on-no-results-page-after-search-doesn-t-go-to-correct-form.yml new file mode 100644 index 00000000000..8d586616e07 --- /dev/null +++ b/changelogs/unreleased/31384-new-issue-button-on-no-results-page-after-search-doesn-t-go-to-correct-form.yml @@ -0,0 +1,4 @@ +--- +title: Remove 'New issue' button when issues search returns no results. +merge_request: !11263 +author: diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 5285dda361b..fdd78600a1d 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -573,6 +573,8 @@ describe 'Issues', feature: true do end describe 'new issue' do + let!(:issue) { create(:issue, project: project) } + context 'by unauthenticated user' do before do logout