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 ...@@ -271,16 +271,16 @@ module EE
return unless epic return unless epic
if !confidential? && epic.confidential? if !confidential? && epic.confidential?
errors.add :issue, confidentiality_error errors.add :base, confidentiality_error
end end
end end
def confidentiality_error def confidentiality_error
if changed_attribute_names_to_save.include?('confidential') 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 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 end
end end
...@@ -290,7 +290,7 @@ RSpec.describe Issue do ...@@ -290,7 +290,7 @@ RSpec.describe Issue do
issue.epic = epic issue.epic = epic
expect(issue).not_to be_valid 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 end
...@@ -319,7 +319,7 @@ RSpec.describe Issue do ...@@ -319,7 +319,7 @@ RSpec.describe Issue do
issue.confidential = false issue.confidential = false
expect(issue).not_to be_valid 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 end
end end
...@@ -339,7 +339,7 @@ RSpec.describe Issue do ...@@ -339,7 +339,7 @@ RSpec.describe Issue do
issue.epic = epic issue.epic = epic
expect(issue).not_to be_valid 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 end
end end
......
...@@ -36990,6 +36990,12 @@ msgstr "" ...@@ -36990,6 +36990,12 @@ msgstr ""
msgid "This is your current session" msgid "This is your current session"
msgstr "" 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." msgid "This issue is confidential and should only be visible to team members with at least Reporter access."
msgstr "" msgstr ""
...@@ -43868,12 +43874,6 @@ msgstr "" ...@@ -43868,12 +43874,6 @@ msgstr ""
msgid "this document" msgid "this document"
msgstr "" 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" msgid "time summary"
msgstr "" 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