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
ecb8e946
Commit
ecb8e946
authored
Jul 11, 2020
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only query for necessary jira fields
parent
58e88479
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
app/services/jira/requests/issues/list_service.rb
app/services/jira/requests/issues/list_service.rb
+4
-1
spec/services/jira/requests/issues/list_service_spec.rb
spec/services/jira/requests/issues/list_service_spec.rb
+6
-0
No files found.
app/services/jira/requests/issues/list_service.rb
View file @
ecb8e946
...
@@ -7,6 +7,9 @@ module Jira
...
@@ -7,6 +7,9 @@ module Jira
extend
::
Gitlab
::
Utils
::
Override
extend
::
Gitlab
::
Utils
::
Override
PER_PAGE
=
100
PER_PAGE
=
100
DEFAULT_FIELDS
=
%w[assignee created creator id issuetype key
labels priority project reporter resolutiondate
status statuscategorychangeddate summary updated]
.
join
(
','
).
freeze
def
initialize
(
jira_service
,
params
=
{})
def
initialize
(
jira_service
,
params
=
{})
super
(
jira_service
,
params
)
super
(
jira_service
,
params
)
...
@@ -22,7 +25,7 @@ module Jira
...
@@ -22,7 +25,7 @@ module Jira
override
:url
override
:url
def
url
def
url
"
#{
base_api_url
}
/search?jql=
#{
CGI
.
escape
(
jql
)
}
&startAt=
#{
start_at
}
&maxResults=
#{
per_page
}
&fields=
*all
"
"
#{
base_api_url
}
/search?jql=
#{
CGI
.
escape
(
jql
)
}
&startAt=
#{
start_at
}
&maxResults=
#{
per_page
}
&fields=
#{
DEFAULT_FIELDS
}
"
end
end
override
:build_service_response
override
:build_service_response
...
...
spec/services/jira/requests/issues/list_service_spec.rb
View file @
ecb8e946
...
@@ -103,6 +103,12 @@ RSpec.describe Jira::Requests::Issues::ListService do
...
@@ -103,6 +103,12 @@ RSpec.describe Jira::Requests::Issues::ListService do
subject
subject
end
end
end
end
it
'requests for default fields'
do
expect
(
client
).
to
receive
(
:get
).
with
(
include
(
"fields=
#{
described_class
::
DEFAULT_FIELDS
}
"
)).
and_return
([])
subject
end
end
end
end
end
end
end
...
...
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