aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2025-02-13 03:26:27 +0800
committerGitHub <noreply@github.com>2025-02-13 03:26:27 +0800
commite741448a14903b2f10259417eb31bc7cae428e2d (patch)
tree0a4ab15f3be67876037d12f0453cdc29ddcfb751 /routers/web
parentbcd1317d177a31a0bc1f9720f0547b43a8a49312 (diff)
downloadgitea-e741448a14903b2f10259417eb31bc7cae428e2d.tar.gz
gitea-e741448a14903b2f10259417eb31bc7cae428e2d.zip
Fix various problems (artifact order, api empty slice, assignee check, fuzzy prompt, mirror proxy, adopt git) (#33569)
* Make artifact list output a stable order * Fix #33506 * Fix #33521 * Fix #33288 * Fix #33196 * Fix #33561
Diffstat (limited to 'routers/web')
-rw-r--r--routers/web/repo/issue_new.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/routers/web/repo/issue_new.go b/routers/web/repo/issue_new.go
index 32daa3e48f..9115fc1771 100644
--- a/routers/web/repo/issue_new.go
+++ b/routers/web/repo/issue_new.go
@@ -276,13 +276,16 @@ func ValidateRepoMetasForNewIssue(ctx *context.Context, form forms.CreateIssueFo
}
pageMetaData.ProjectsData.SelectedProjectID = form.ProjectID
+ // prepare assignees
candidateAssignees := toSet(pageMetaData.AssigneesData.CandidateAssignees, func(user *user_model.User) int64 { return user.ID })
inputAssigneeIDs, _ := base.StringsToInt64s(strings.Split(form.AssigneeIDs, ","))
- if len(inputAssigneeIDs) > 0 && !candidateAssignees.Contains(inputAssigneeIDs...) {
- ctx.NotFound("", nil)
- return ret
+ var assigneeIDStrings []string
+ for _, inputAssigneeID := range inputAssigneeIDs {
+ if candidateAssignees.Contains(inputAssigneeID) {
+ assigneeIDStrings = append(assigneeIDStrings, strconv.FormatInt(inputAssigneeID, 10))
+ }
}
- pageMetaData.AssigneesData.SelectedAssigneeIDs = form.AssigneeIDs
+ pageMetaData.AssigneesData.SelectedAssigneeIDs = strings.Join(assigneeIDStrings, ",")
// Check if the passed reviewers (user/team) actually exist
var reviewers []*user_model.User