[go: up one dir, main page]

It's impossible to unassign issue using Edit Issue API

Summary

Looks like it's not possible to unassign issue using this API.

The following has been tried:

  1. Send assignee_id: null
    Nothing happens - assignee remains the same.

  2. Send assignee_id: 0
    Issue unassigned but it becomes impossible to edit it then due to the following error:

Processing by Projects::IssuesController#update as JSON
  Parameters: {"issue"=>{"assignee_id"=>"1"}, "namespace_id"=>"templates", "project_id"=>"template-1", "id"=>"21"}

ActiveRecord::RecordNotFound (Couldn't find User with 'id'=0):
  app/models/concerns/issuable.rb:87:in `update_assignee_cache_counts'
  app/services/issuable_base_service.rb:98:in `block in update_issuable'
  app/services/issuable_base_service.rb:89:in `update_issuable'
  app/services/issuable_base_service.rb:108:in `update'
  app/services/issues/update_service.rb:4:in `execute'
  app/controllers/projects/issues_controller.rb:99:in `update'
  lib/gitlab/middleware/go.rb:16:in `call'

Steps to reproduce

Try to unassign issue using Edit Issue API

Expected behavior

There should be the way to unassign issue using Edit Issue API.

Actual behavior

It's impossible to unassign issue using Edit Issue API. Or unassigning breaks issue completely.

Results of GitLab environment info

System information
System:		Ubuntu 14.04
Current User:	git
Using RVM:	no
Ruby Version:	2.3.1p112
Gem Version:	2.6.6
Bundler Version:2.3.0
Rake Version:	10.5.0
Sidekiq Version:4.1.4

GitLab information
Version:	8.11.3
Revision:	6cd4edb
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers: github

GitLab Shell
Version:	3.4.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
Hooks:		/opt/gitlab/embedded/service/gitlab-shell/hooks/
Git:		/opt/gitlab/embedded/bin/git