Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [API] CreateIssue not ignore empty assignees #8872

Closed
6543 opened this issue Nov 7, 2019 · 0 comments · Fixed by #8873
Closed

[Bug] [API] CreateIssue not ignore empty assignees #8872

6543 opened this issue Nov 7, 2019 · 0 comments · Fixed by #8873
Labels
Milestone

Comments

@6543
Copy link
Member

6543 commented Nov 7, 2019

afected version: 1.11-dev
not afected: 1.9.x; 1.10.0

If json include "assignees": [ "" ], responce is 422:

{
  "message": "Assignee does not exist: [name: user does not exist [uid: 0, name: , keyid: 0]]",
  "url": "https://gitea.com/api/swagger"
}

What sould happen: ignore assignees

6543 added a commit to 6543-forks/gitea that referenced this issue Nov 7, 2019
@lunny lunny added the type/bug label Nov 9, 2019
@6543 6543 changed the title [Bug] [API] CreateIssue [Bug] [API] CreateIssue not ignore empty assignees Nov 9, 2019
@lunny lunny added this to the 1.11.0 milestone Nov 10, 2019
lunny pushed a commit that referenced this issue Nov 10, 2019
* keep sure if assigneeIDs == nil -> do nothing

* fix #8872

* Revert "keep sure if assigneeIDs == nil -> do nothing"

-> go handle it itself preaty well

This reverts commit e72d941.

* clarity comparson

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* simplify

* Update models/issue_assignees.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Update issue_assignees.go

* simplify more

* add --if oneAssignee != ""-- again

* Update models/issue_assignees.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* CI.restart()

* Update issue_assignees.go

* add Test for GetUserIDsByNames

* add Test for MakeIDsFromAPIAssigneesToAdd

* fix test
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants