Commit d1045bb8 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'russell/fix-confidential-epic-typo' into 'master'

Fix typo in banner that can appear when making an issue public

See merge request gitlab-org/gitlab!78625
parents 10d7c554 99c6fc4f
......@@ -271,16 +271,16 @@ module EE
return unless epic
if !confidential? && epic.confidential?
errors.add :issue, confidentiality_error
errors.add :base, confidentiality_error
end
end
def confidentiality_error
if changed_attribute_names_to_save.include?('confidential')
return _('this issue cannot be made public since it belongs to a confidential epic')
return _('This issue cannot be made public because it belongs to a confidential epic.')
end
_('this issue cannot be assigned to a confidential epic since it is public')
_('This issue cannot be assigned to a confidential epic because it is public.')
end
end
end
......@@ -290,7 +290,7 @@ RSpec.describe Issue do
issue.epic = epic
expect(issue).not_to be_valid
expect(issue.errors.messages[:issue]).to include(/this issue cannot be assigned to a confidential epic since it is public/)
expect(issue.errors.messages[:base]).to include(/This issue cannot be assigned to a confidential epic because it is public./)
end
end
......@@ -319,7 +319,7 @@ RSpec.describe Issue do
issue.confidential = false
expect(issue).not_to be_valid
expect(issue.errors.messages[:issue]).to include(/this issue cannot be made public since it belongs to a confidential epic/)
expect(issue.errors.messages[:base]).to include(/This issue cannot be made public because it belongs to a confidential epic./)
end
end
end
......@@ -339,7 +339,7 @@ RSpec.describe Issue do
issue.epic = epic
expect(issue).not_to be_valid
expect(issue.errors.messages[:issue]).to include(/this issue cannot be assigned to a confidential epic since it is public/)
expect(issue.errors.messages[:base]).to include(/This issue cannot be assigned to a confidential epic because it is public./)
end
end
end
......
......@@ -36990,6 +36990,12 @@ msgstr ""
msgid "This is your current session"
msgstr ""
msgid "This issue cannot be assigned to a confidential epic because it is public."
msgstr ""
msgid "This issue cannot be made public because it belongs to a confidential epic."
msgstr ""
msgid "This issue is confidential and should only be visible to team members with at least Reporter access."
msgstr ""
......@@ -43868,12 +43874,6 @@ msgstr ""
msgid "this document"
msgstr ""
msgid "this issue cannot be assigned to a confidential epic since it is public"
msgstr ""
msgid "this issue cannot be made public since it belongs to a confidential epic"
msgstr ""
msgid "time summary"
msgstr ""
......
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