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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
5961d142
Commit
5961d142
authored
Dec 22, 2016
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix state_event parameter to reopen an issue
parent
7ab79dff
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
lib/api/issues.rb
lib/api/issues.rb
+1
-2
spec/requests/api/issues_spec.rb
spec/requests/api/issues_spec.rb
+7
-0
No files found.
lib/api/issues.rb
View file @
5961d142
...
...
@@ -37,8 +37,6 @@ module API
optional
:labels
,
type:
String
,
desc:
'Comma-separated list of label names'
optional
:due_date
,
type:
String
,
desc:
'Date time string in the format YEAR-MONTH-DAY'
optional
:confidential
,
type:
Boolean
,
desc:
'Boolean parameter if the issue should be confidential'
optional
:state_event
,
type:
String
,
values:
%w[open close]
,
desc:
'State of the issue'
end
end
...
...
@@ -172,6 +170,7 @@ module API
optional
:title
,
type:
String
,
desc:
'The title of an issue'
optional
:updated_at
,
type:
DateTime
,
desc:
'Date time when the issue was updated. Available only for admins and project owners.'
optional
:state_event
,
type:
String
,
values:
%w[reopen close]
,
desc:
'State of the issue'
use
:issue_params
at_least_one_of
:title
,
:description
,
:assignee_id
,
:milestone_id
,
:labels
,
:created_at
,
:due_date
,
:confidential
,
:state_event
...
...
spec/requests/api/issues_spec.rb
View file @
5961d142
...
...
@@ -932,6 +932,13 @@ describe API::Issues, api: true do
expect
(
json_response
[
'state'
]).
to
eq
"closed"
end
it
'reopens a project isssue'
do
put
api
(
"/projects/
#{
project
.
id
}
/issues/
#{
closed_issue
.
id
}
"
,
user
),
state_event:
'reopen'
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
[
'state'
]).
to
eq
'reopened'
end
context
'when an admin or owner makes the request'
do
it
'accepts the update date to be set'
do
update_time
=
2
.
weeks
.
ago
...
...
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