Adding issues to a list where the board is scoped to `Any`, `None`, or `0` weights returns 422 (Unprocessable Entity)
Summary
Adding issues to a list where the board is scoped to Any
, None
, or 0
weights returns 422 (Unprocessable Entity), and the issue isn't created.
By default, it seems boards are created with a weight value of null
(unless one of those weights is specified). Any of the above scopes become -1
, which may explain the behavior in https://gitlab.com/gitlab-org/gitlab-ce/issues/50008.
ZD: https://gitlab.zendesk.com/agent/tickets/101574 (internal)
/cc @felipe_artur
Steps to reproduce
- Create a board scoped to either of the above weights
- Add an issue to a list
Example Project
https://gitlab.com/services-support-testing/d/board/boards/696438?=
What is the current bug behavior?
422 error returned in the console
What is the expected correct behavior?
The issue should be added
Relevant logs and/or screenshots
{"method":"POST","path":"<omitted>","format":"json","controller":"Boards::IssuesController","action":"create","status":422,"duration":170.38,"view":0.24,"db":92.67,"time":"2018-08-07T20:54:04.600Z","remote_ip":"<omitted>","user_id":<omitted>,"username":"<omitted>","response":"{\"weight\":[\"must be greater than or equal to 0\"]}","tag":"rails.production","environment":"prd","hostname":"web-01","fqdn":"web-01.sv.prd.gitlab.com","message":null}
Kibana (internal)
Output of checks
This bug happens on GitLab.com (11.2.0-rc2-ee
)