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
4b92d729
Commit
4b92d729
authored
Aug 18, 2020
by
Mario de la Ossa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issues api - allow empty due_date arg
parent
2e6e20a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
lib/api/issues.rb
lib/api/issues.rb
+1
-1
spec/requests/api/issues/issues_spec.rb
spec/requests/api/issues/issues_spec.rb
+6
-0
No files found.
lib/api/issues.rb
View file @
4b92d729
...
...
@@ -55,7 +55,7 @@ module API
desc:
'Return issues ordered by `created_at` or `updated_at` fields.'
optional
:sort
,
type:
String
,
values:
%w[asc desc]
,
default:
'desc'
,
desc:
'Return issues sorted in `asc` or `desc` order.'
optional
:due_date
,
type:
String
,
values:
%w[0 overdue week month next_month_and_previous_two_weeks]
,
optional
:due_date
,
type:
String
,
values:
%w[0 overdue week month next_month_and_previous_two_weeks]
<<
''
,
desc:
'Return issues that have no due date (`0`), or whose due date is this week, this month, between two weeks ago and next month, or which are overdue. Accepts: `overdue`, `week`, `month`, `next_month_and_previous_two_weeks`, `0`'
use
:issues_stats_params
...
...
spec/requests/api/issues/issues_spec.rb
View file @
4b92d729
...
...
@@ -404,6 +404,12 @@ RSpec.describe API::Issues do
travel_back
end
it
'returns them all when argument is empty'
do
get
api
(
'/issues?due_date='
,
user
)
expect_paginated_array_response
(
issue5
.
id
,
issue4
.
id
,
issue3
.
id
,
issue2
.
id
,
issue
.
id
,
closed_issue
.
id
)
end
it
'returns issues without due date'
do
get
api
(
'/issues?due_date=0'
,
user
)
...
...
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