[PR #622] [MERGED] Fix: Issues cannot be created with labels #15495

Closed
opened 2025-11-02 11:47:52 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/622
Author: @kaz
Created: 1/9/2017
Status: Merged
Merged: 1/10/2017
Merged by: @lunny

Base: masterHead: fix


📝 Commits (1)

  • 30b9849 Fix: Issues cannot be created with labels

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 public/js/index.js (+3 -3)

📄 Description

Now POST /issues/new receives form.LabelIDs with a trailing comma.

This causes an error here ↓
https://github.com/go-gitea/gitea/blob/master/routers/repo/issue.go#L392-L395
ValidateRepoMetas returns nil, 0, 0

Due to this, new issues cannot be created with labels, milestones, and assignees.
I modified client-side js to remove the trailing comma.

This bug seems to be caused by this change ↓
4c89a9c33c (diff-88e948dbecd728e2513ba9bafe876faaL465)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/622 **Author:** [@kaz](https://github.com/kaz) **Created:** 1/9/2017 **Status:** ✅ Merged **Merged:** 1/10/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `fix` --- ### 📝 Commits (1) - [`30b9849`](https://github.com/go-gitea/gitea/commit/30b98495ec89a3603b01fdeb8b8c4b7c95b6a9d9) Fix: Issues cannot be created with labels ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `public/js/index.js` (+3 -3) </details> ### 📄 Description Now `POST /issues/new` receives `form.LabelIDs` with a trailing comma. This causes an error here ↓ https://github.com/go-gitea/gitea/blob/master/routers/repo/issue.go#L392-L395 `ValidateRepoMetas` returns `nil, 0, 0` Due to this, new issues cannot be created with labels, milestones, and assignees. I modified client-side js to remove the trailing comma. This bug seems to be caused by this change ↓ https://github.com/go-gitea/gitea/commit/4c89a9c33c4c097836f5bfa79cc7e5adc142a2f0#diff-88e948dbecd728e2513ba9bafe876faaL465 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:47:52 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15495