Same issue shows twice in project's column #11859

Closed
opened 2025-11-02 09:49:55 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @stuzer05 on GitHub (Oct 16, 2023).

Originally assigned to: @edlerd on GitHub.

Description

I added spent time and then closed an issue

Gitea Version

trunk

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

image

Git Version

6c501b14

Operating System

No response

How are you running Gitea?

binary

Database

None

Originally created by @stuzer05 on GitHub (Oct 16, 2023). Originally assigned to: @edlerd on GitHub. ### Description I added spent time and then closed an issue ### Gitea Version trunk ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots ![image](https://github.com/go-gitea/gitea/assets/23124682/e91d0be5-7611-4438-a0b3-49c9ee9c0178) ### Git Version 6c501b14 ### Operating System _No response_ ### How are you running Gitea? binary ### Database None
GiteaMirror added the topic/projectstype/bug labels 2025-11-02 09:49:55 -06:00
Author
Owner

@edlerd commented on GitHub (Oct 16, 2023):

I would like to work on this, can you assign me?

@edlerd commented on GitHub (Oct 16, 2023): I would like to work on this, can you assign me?
Author
Owner

@stuzer05 commented on GitHub (Oct 16, 2023):

I would like to work on this, can you assign me?

You can make a pr, I don't have rights to assign anyone

@stuzer05 commented on GitHub (Oct 16, 2023): > I would like to work on this, can you assign me? You can make a pr, I don't have rights to assign anyone
Author
Owner

@edlerd commented on GitHub (Oct 16, 2023):

Can you reproduce the bug on the Gitea demo site?

Yes

@stuzer05 can you please add detailed steps how to reproduce the issue on https://try.gitea.io/ ?
I am having trouble finding a way to reproduce it.

@edlerd commented on GitHub (Oct 16, 2023): > ### Can you reproduce the bug on the Gitea demo site? > Yes @stuzer05 can you please add detailed steps how to reproduce the issue on https://try.gitea.io/ ? I am having trouble finding a way to reproduce it.
Author
Owner

@stuzer05 commented on GitHub (Oct 16, 2023):

I honestly cannot reproduce it myself, it was just random. The problem was in the project_issue table thewe were 2 identical records. Maybe, if there was a constraint for unique column values there wouldn't be an issue

@stuzer05 commented on GitHub (Oct 16, 2023): I honestly cannot reproduce it myself, it was just random. The problem was in the `project_issue` table thewe were 2 identical records. Maybe, if there was a constraint for unique column values there wouldn't be an issue
Author
Owner

@techknowlogick commented on GitHub (Oct 16, 2023):

@stuzer05 which database are you using?

@techknowlogick commented on GitHub (Oct 16, 2023): @stuzer05 which database are you using?
Author
Owner

@lunny commented on GitHub (Oct 16, 2023):

I guess it's a database join or group problem.

@lunny commented on GitHub (Oct 16, 2023): I guess it's a database join or group problem.
Author
Owner

@stuzer05 commented on GitHub (Oct 16, 2023):

@stuzer05 which database are you using?

postgres

@stuzer05 commented on GitHub (Oct 16, 2023): > @stuzer05 which database are you using? postgres
Author
Owner

@edlerd commented on GitHub (Oct 17, 2023):

I think this is a bug in the LoadIssuesFromBoard function, will submit a PR with a suggestion to fix it.

@edlerd commented on GitHub (Oct 17, 2023): I think this is a bug in the `LoadIssuesFromBoard` function, will submit a PR with a suggestion to fix it.
Author
Owner

@stuzer05 commented on GitHub (Oct 17, 2023):

You can verify your fix by duplicating the row in project_issue table like this
image

Also, I would add a unique constraint for (issue_id, project_id) cols so duplicate rows would never happen in the first place

@stuzer05 commented on GitHub (Oct 17, 2023): You can verify your fix by duplicating the row in `project_issue` table like this ![image](https://github.com/go-gitea/gitea/assets/23124682/42c4d05c-46f2-4cd0-aeee-5f2c5859778b) Also, I would add a unique constraint for (issue_id, project_id) cols so duplicate rows would never happen in the first place
Author
Owner

@edlerd commented on GitHub (Oct 17, 2023):

You can verify your fix by duplicating the row in project_issue table like this

Is this from your gitea deployment?
Are you using any plugins?

The only place that adds to this table that I found is in project_issues.go where any previous entries to the table are removed before adding a new entry.

Maybe the remove, add comment and create actions from project_issues.go should be done in a transaction?

@edlerd commented on GitHub (Oct 17, 2023): > You can verify your fix by duplicating the row in `project_issue` table like this Is this from your gitea deployment? Are you using any plugins? The only place that adds to this table that I found is in [project_issues.go](https://github.com/go-gitea/gitea/blob/main/models/issues/issue_project.go#L148) where any previous entries to the table are removed before adding a new entry. Maybe the remove, add comment and create actions from `project_issues.go` should be done in a transaction?
Author
Owner

@lng2020 commented on GitHub (Oct 23, 2023):

Not sure if it's connected with https://github.com/go-gitea/gitea/pull/27746
But it seems more like a front-end issue, like sending the request twice. IIRC, there is an issue about the project board frontend concurrency issue too.

@lng2020 commented on GitHub (Oct 23, 2023): Not sure if it's connected with https://github.com/go-gitea/gitea/pull/27746 But it seems more like a front-end issue, like sending the request twice. IIRC, there is an issue about the project board frontend concurrency issue too.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11859