Commit 8474a0ba authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'msjr-no-issue-found-for-params' into 'master'

Resolve "Improve text for error "No issue found for given params" in UI"

See merge request gitlab-org/gitlab!45064
parents 5894d37d cd6985e3
...@@ -107,11 +107,11 @@ module IssuableLinks ...@@ -107,11 +107,11 @@ module IssuableLinks
end end
def issuables_assigned_message def issuables_assigned_message
'Issue(s) already assigned' _("Issue(s) already assigned")
end end
def issuables_not_found_message def issuables_not_found_message
'No Issue found for given params' _("No matching issue found. Make sure that you are adding a valid issue URL.")
end end
end end
end end
......
---
title: Resolve Improve text for error No issue found for given params in UI
merge_request: 45064
author:
type: other
...@@ -45,7 +45,7 @@ RSpec.describe Mutations::Epics::AddIssue do ...@@ -45,7 +45,7 @@ RSpec.describe Mutations::Epics::AddIssue do
it 'returns error if issue is not found' do it 'returns error if issue is not found' do
issue.update!(project: create(:project)) issue.update!(project: create(:project))
expect(subject[:errors]).to eq('No Issue found for given params') expect(subject[:errors]).to eq('No matching issue found. Make sure that you are adding a valid issue URL.')
end end
end end
end end
......
...@@ -117,7 +117,7 @@ RSpec.describe API::EpicIssues do ...@@ -117,7 +117,7 @@ RSpec.describe API::EpicIssues do
post api(url, user) post api(url, user)
expect(response).to have_gitlab_http_status(:not_found) expect(response).to have_gitlab_http_status(:not_found)
expect(json_response).to eq('message' => 'No Issue found for given params') expect(json_response).to eq('message' => 'No matching issue found. Make sure that you are adding a valid issue URL.')
end end
end end
end end
......
...@@ -70,7 +70,7 @@ RSpec.describe EpicIssues::CreateService do ...@@ -70,7 +70,7 @@ RSpec.describe EpicIssues::CreateService do
shared_examples 'returns an error' do shared_examples 'returns an error' do
it 'returns an error' do it 'returns an error' do
expect(subject).to eq(message: 'No Issue found for given params', status: :error, http_status: 404) expect(subject).to eq(message: 'No matching issue found. Make sure that you are adding a valid issue URL.', status: :error, http_status: 404)
end end
it 'no relationship is created' do it 'no relationship is created' do
......
...@@ -17073,6 +17073,9 @@ msgstr "" ...@@ -17073,6 +17073,9 @@ msgstr ""
msgid "Issue weight" msgid "Issue weight"
msgstr "" msgstr ""
msgid "Issue(s) already assigned"
msgstr ""
msgid "IssueAnalytics|Age" msgid "IssueAnalytics|Age"
msgstr "" msgstr ""
...@@ -20768,6 +20771,9 @@ msgstr "" ...@@ -20768,6 +20771,9 @@ msgstr ""
msgid "No matches found" msgid "No matches found"
msgstr "" msgstr ""
msgid "No matching issue found. Make sure that you are adding a valid issue URL."
msgstr ""
msgid "No matching labels" msgid "No matching labels"
msgstr "" msgstr ""
......
...@@ -82,7 +82,7 @@ RSpec.describe API::IssueLinks do ...@@ -82,7 +82,7 @@ RSpec.describe API::IssueLinks do
params: { target_project_id: unauthorized_project.id, target_issue_iid: target_issue.iid } params: { target_project_id: unauthorized_project.id, target_issue_iid: target_issue.iid }
expect(response).to have_gitlab_http_status(:not_found) expect(response).to have_gitlab_http_status(:not_found)
expect(json_response['message']).to eq('No Issue found for given params') expect(json_response['message']).to eq('No matching issue found. Make sure that you are adding a valid issue URL.')
end end
end end
......
...@@ -71,7 +71,7 @@ RSpec.describe Projects::IssueLinksController do ...@@ -71,7 +71,7 @@ RSpec.describe Projects::IssueLinksController do
list_service_response = IssueLinks::ListService.new(issue, user).execute list_service_response = IssueLinks::ListService.new(issue, user).execute
expect(response).to have_gitlab_http_status(:not_found) expect(response).to have_gitlab_http_status(:not_found)
expect(json_response).to eq('message' => 'No Issue found for given params', 'issuables' => list_service_response.as_json) expect(json_response).to eq('message' => 'No matching issue found. Make sure that you are adding a valid issue URL.', 'issuables' => list_service_response.as_json)
end end
end end
end end
......
...@@ -24,7 +24,7 @@ RSpec.describe IssueLinks::CreateService do ...@@ -24,7 +24,7 @@ RSpec.describe IssueLinks::CreateService do
end end
it 'returns error' do it 'returns error' do
is_expected.to eq(message: 'No Issue found for given params', status: :error, http_status: 404) is_expected.to eq(message: 'No matching issue found. Make sure that you are adding a valid issue URL.', status: :error, http_status: 404)
end end
end end
...@@ -34,7 +34,7 @@ RSpec.describe IssueLinks::CreateService do ...@@ -34,7 +34,7 @@ RSpec.describe IssueLinks::CreateService do
end end
it 'returns error' do it 'returns error' do
is_expected.to eq(message: 'No Issue found for given params', status: :error, http_status: 404) is_expected.to eq(message: 'No matching issue found. Make sure that you are adding a valid issue URL.', status: :error, http_status: 404)
end end
it 'no relationship is created' do it 'no relationship is created' do
...@@ -52,7 +52,7 @@ RSpec.describe IssueLinks::CreateService do ...@@ -52,7 +52,7 @@ RSpec.describe IssueLinks::CreateService do
it 'returns error' do it 'returns error' do
target_issuable.project.add_guest(user) target_issuable.project.add_guest(user)
is_expected.to eq(message: 'No Issue found for given params', status: :error, http_status: 404) is_expected.to eq(message: 'No matching issue found. Make sure that you are adding a valid issue URL.', status: :error, http_status: 404)
end end
it 'no relationship is created' do it 'no relationship is created' 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