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
331f1d37
Commit
331f1d37
authored
May 05, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Returns simple path instead full_path for projects
parent
7cce1ef3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/services/related_issues/list_service.rb
app/services/related_issues/list_service.rb
+1
-1
spec/services/related_issues/list_service_spec.rb
spec/services/related_issues/list_service_spec.rb
+4
-4
No files found.
app/services/related_issues/list_service.rb
View file @
331f1d37
...
@@ -12,7 +12,7 @@ module RelatedIssues
...
@@ -12,7 +12,7 @@ module RelatedIssues
title:
referenced_issue
.
title
,
title:
referenced_issue
.
title
,
iid:
referenced_issue
.
iid
,
iid:
referenced_issue
.
iid
,
state:
referenced_issue
.
state
,
state:
referenced_issue
.
state
,
project_
full_path:
referenced_issue
.
project
.
full_
path
,
project_
path:
referenced_issue
.
project
.
path
,
namespace_full_path:
referenced_issue
.
project
.
namespace
.
full_path
,
namespace_full_path:
referenced_issue
.
project
.
namespace
.
full_path
,
path:
namespace_project_issue_path
(
referenced_issue
.
project
.
namespace
,
referenced_issue
.
project
,
referenced_issue
.
iid
),
path:
namespace_project_issue_path
(
referenced_issue
.
project
.
namespace
,
referenced_issue
.
project
,
referenced_issue
.
iid
),
destroy_relation_path:
destroy_relation_path
(
referenced_issue
)
destroy_relation_path:
destroy_relation_path
(
referenced_issue
)
...
...
spec/services/related_issues/list_service_spec.rb
View file @
331f1d37
...
@@ -37,7 +37,7 @@ describe RelatedIssues::ListService, service: true do
...
@@ -37,7 +37,7 @@ describe RelatedIssues::ListService, service: true do
it
'verifies number of queries'
do
it
'verifies number of queries'
do
recorded
=
ActiveRecord
::
QueryRecorder
.
new
{
subject
}
recorded
=
ActiveRecord
::
QueryRecorder
.
new
{
subject
}
expect
(
recorded
.
count
).
to
be_within
(
1
).
of
(
42
)
expect
(
recorded
.
count
).
to
be_within
(
1
).
of
(
39
)
end
end
it
'returns related issues JSON'
do
it
'returns related issues JSON'
do
...
@@ -49,7 +49,7 @@ describe RelatedIssues::ListService, service: true do
...
@@ -49,7 +49,7 @@ describe RelatedIssues::ListService, service: true do
iid:
issue_b
.
iid
,
iid:
issue_b
.
iid
,
state:
issue_b
.
state
,
state:
issue_b
.
state
,
path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_b
.
iid
}
"
,
path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_b
.
iid
}
"
,
project_
full_path:
issue_b
.
project
.
full_
path
,
project_
path:
issue_b
.
project
.
path
,
namespace_full_path:
issue_b
.
project
.
namespace
.
full_path
,
namespace_full_path:
issue_b
.
project
.
namespace
.
full_path
,
destroy_relation_path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_b
.
iid
}
/related_issues/
#{
related_issue_a
.
id
}
"
destroy_relation_path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_b
.
iid
}
/related_issues/
#{
related_issue_a
.
id
}
"
}
}
...
@@ -61,7 +61,7 @@ describe RelatedIssues::ListService, service: true do
...
@@ -61,7 +61,7 @@ describe RelatedIssues::ListService, service: true do
iid:
issue_c
.
iid
,
iid:
issue_c
.
iid
,
state:
issue_c
.
state
,
state:
issue_c
.
state
,
path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_c
.
iid
}
"
,
path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_c
.
iid
}
"
,
project_
full_path:
issue_c
.
project
.
full_
path
,
project_
path:
issue_c
.
project
.
path
,
namespace_full_path:
issue_c
.
project
.
namespace
.
full_path
,
namespace_full_path:
issue_c
.
project
.
namespace
.
full_path
,
destroy_relation_path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_c
.
iid
}
/related_issues/
#{
related_issue_b
.
id
}
"
destroy_relation_path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_c
.
iid
}
/related_issues/
#{
related_issue_b
.
id
}
"
}
}
...
@@ -73,7 +73,7 @@ describe RelatedIssues::ListService, service: true do
...
@@ -73,7 +73,7 @@ describe RelatedIssues::ListService, service: true do
iid:
issue_d
.
iid
,
iid:
issue_d
.
iid
,
state:
issue_d
.
state
,
state:
issue_d
.
state
,
path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_d
.
iid
}
"
,
path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_d
.
iid
}
"
,
project_
full_path:
issue_d
.
project
.
full_
path
,
project_
path:
issue_d
.
project
.
path
,
namespace_full_path:
issue_d
.
project
.
namespace
.
full_path
,
namespace_full_path:
issue_d
.
project
.
namespace
.
full_path
,
destroy_relation_path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_d
.
iid
}
/related_issues/
#{
related_issue_c
.
id
}
"
destroy_relation_path:
"/
#{
project
.
full_path
}
/issues/
#{
issue_d
.
iid
}
/related_issues/
#{
related_issue_c
.
id
}
"
}
}
...
...
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