Issue uses StateMachine now
This commit is contained in:
parent
0b512af803
commit
1644117a1a
13 changed files with 144 additions and 145 deletions
|
@ -69,14 +69,14 @@ module Gitlab
|
|||
# assignee_id (optional) - The ID of a user to assign issue
|
||||
# milestone_id (optional) - The ID of a milestone to assign issue
|
||||
# labels (optional) - The labels of an issue
|
||||
# closed (optional) - The state of an issue (0 = false, 1 = true)
|
||||
# state (optional) - The state of an issue (close|reopen)
|
||||
# Example Request:
|
||||
# PUT /projects/:id/issues/:issue_id
|
||||
put ":id/issues/:issue_id" do
|
||||
@issue = user_project.issues.find(params[:issue_id])
|
||||
authorize! :modify_issue, @issue
|
||||
|
||||
attrs = attributes_for_keys [:title, :description, :assignee_id, :milestone_id, :closed]
|
||||
attrs = attributes_for_keys [:title, :description, :assignee_id, :milestone_id, :state_event]
|
||||
attrs[:label_list] = params[:labels] if params[:labels].present?
|
||||
IssueObserver.current_user = current_user
|
||||
if @issue.update_attributes attrs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue