Commit 31e89bc3 authored by charlieablett's avatar charlieablett

Make Jira capitalisation consistent

- Change from `jira` to `Jira` in UI
parent 45183ce3
...@@ -36,7 +36,7 @@ module Projects ...@@ -36,7 +36,7 @@ module Projects
response = ::JiraImport::StartImportService.new(current_user, @project, jira_project_key).execute response = ::JiraImport::StartImportService.new(current_user, @project, jira_project_key).execute
flash[:notice] = response.message if response.message.present? flash[:notice] = response.message if response.message.present?
else else
flash[:alert] = 'No jira project key has been provided.' flash[:alert] = 'No Jira project key has been provided.'
end end
redirect_to project_import_jira_path(@project) redirect_to project_import_jira_path(@project)
......
...@@ -56,7 +56,7 @@ module JiraImport ...@@ -56,7 +56,7 @@ module JiraImport
import_start_time = Time.zone.now import_start_time = Time.zone.now
jira_imports_for_project = project.jira_imports.by_jira_project_key(jira_project_key).size + 1 jira_imports_for_project = project.jira_imports.by_jira_project_key(jira_project_key).size + 1
title = "jira-import::#{jira_project_key}-#{jira_imports_for_project}" title = "jira-import::#{jira_project_key}-#{jira_imports_for_project}"
description = "Label for issues that were imported from jira on #{import_start_time.strftime('%Y-%m-%d %H:%M:%S')}" description = "Label for issues that were imported from Jira on #{import_start_time.strftime('%Y-%m-%d %H:%M:%S')}"
color = "#{Label.color_for(title)}" color = "#{Label.color_for(title)}"
{ title: title, description: description, color: color } { title: title, description: description, color: color }
end end
......
...@@ -19,7 +19,7 @@ module Gitlab ...@@ -19,7 +19,7 @@ module Gitlab
def cache_import_label(project) def cache_import_label(project)
label = project.jira_imports.by_jira_project_key(jira_project_key).last.label label = project.jira_imports.by_jira_project_key(jira_project_key).last.label
raise Projects::ImportService::Error, _('Failed to find import label for jira import.') unless label raise Projects::ImportService::Error, _('Failed to find import label for Jira import.') unless label
JiraImport.cache_import_label_id(project.id, label.id) JiraImport.cache_import_label_id(project.id, label.id)
end end
......
...@@ -8759,7 +8759,7 @@ msgstr "" ...@@ -8759,7 +8759,7 @@ msgstr ""
msgid "Failed to enqueue the rebase operation, possibly due to a long-lived transaction. Try again later." msgid "Failed to enqueue the rebase operation, possibly due to a long-lived transaction. Try again later."
msgstr "" msgstr ""
msgid "Failed to find import label for jira import." msgid "Failed to find import label for Jira import."
msgstr "" msgstr ""
msgid "Failed to get ref." msgid "Failed to get ref."
......
...@@ -152,7 +152,7 @@ describe Projects::Import::JiraController do ...@@ -152,7 +152,7 @@ describe Projects::Import::JiraController do
post :import, params: { namespace_id: project.namespace, project_id: project, jira_project_key: '' } post :import, params: { namespace_id: project.namespace, project_id: project, jira_project_key: '' }
expect(response).to redirect_to(project_import_jira_path(project)) expect(response).to redirect_to(project_import_jira_path(project))
expect(flash[:alert]).to eq('No jira project key has been provided.') expect(flash[:alert]).to eq('No Jira project key has been provided.')
end end
end end
......
...@@ -18,7 +18,7 @@ describe Gitlab::JiraImport::LabelsImporter do ...@@ -18,7 +18,7 @@ describe Gitlab::JiraImport::LabelsImporter do
let_it_be(:no_label_jira_import) { create(:jira_import_state, label: nil, project: project) } let_it_be(:no_label_jira_import) { create(:jira_import_state, label: nil, project: project) }
it 'raises error' do it 'raises error' do
expect { subject }.to raise_error(Projects::ImportService::Error, 'Failed to find import label for jira import.') expect { subject }.to raise_error(Projects::ImportService::Error, 'Failed to find import label for Jira import.')
end end
end end
......
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