Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1ebdf6a3
Commit
1ebdf6a3
authored
Mar 16, 2022
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename issuables_assigned_message method
parent
af9c91fe
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
app/services/issuable_links/create_service.rb
app/services/issuable_links/create_service.rb
+2
-2
ee/app/services/epic_links/create_service.rb
ee/app/services/epic_links/create_service.rb
+2
-6
ee/spec/services/epic_links/create_service_spec.rb
ee/spec/services/epic_links/create_service_spec.rb
+1
-1
No files found.
app/services/issuable_links/create_service.rb
View file @
1ebdf6a3
...
@@ -17,7 +17,7 @@ module IssuableLinks
...
@@ -17,7 +17,7 @@ module IssuableLinks
# otherwise create issue links for the issues which
# otherwise create issue links for the issues which
# are still not assigned and return success message.
# are still not assigned and return success message.
if
render_conflict_error?
if
render_conflict_error?
return
error
(
issuables_assigned_message
,
409
)
return
error
(
issuables_a
lready_a
ssigned_message
,
409
)
end
end
if
render_not_found_error?
if
render_not_found_error?
...
@@ -110,7 +110,7 @@ module IssuableLinks
...
@@ -110,7 +110,7 @@ module IssuableLinks
{}
{}
end
end
def
issuables_assigned_message
def
issuables_a
lready_a
ssigned_message
_
(
'%{issuable}(s) already assigned'
%
{
issuable:
target_issuable_type
.
capitalize
})
_
(
'%{issuable}(s) already assigned'
%
{
issuable:
target_issuable_type
.
capitalize
})
end
end
...
...
ee/app/services/epic_links/create_service.rb
View file @
1ebdf6a3
...
@@ -87,12 +87,8 @@ module EpicLinks
...
@@ -87,12 +87,8 @@ module EpicLinks
@descendants
||=
issuable
.
group
.
self_and_descendants
@descendants
||=
issuable
.
group
.
self_and_descendants
end
end
def
issuables_assigned_message
def
target_issuable_type
'Epic(s) already assigned'
:epic
end
def
issuables_not_found_message
'No Epic found for given params'
end
end
end
end
end
end
ee/spec/services/epic_links/create_service_spec.rb
View file @
1ebdf6a3
...
@@ -10,7 +10,7 @@ RSpec.describe EpicLinks::CreateService do
...
@@ -10,7 +10,7 @@ RSpec.describe EpicLinks::CreateService do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:epic_to_add
)
{
create
(
:epic
,
group:
group
)
}
let
(
:epic_to_add
)
{
create
(
:epic
,
group:
group
)
}
let
(
:expected_error
)
{
'No
Epic found for given params
'
}
let
(
:expected_error
)
{
'No
matching epic found. Make sure that you are adding a valid epic URL.
'
}
let
(
:expected_code
)
{
404
}
let
(
:expected_code
)
{
404
}
let
(
:valid_reference
)
{
epic_to_add
.
to_reference
(
full:
true
)
}
let
(
:valid_reference
)
{
epic_to_add
.
to_reference
(
full:
true
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment