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

Same issue shows twice in project's column #27639

Closed
stuzer05 opened this issue Oct 16, 2023 · 11 comments · Fixed by #30190
Closed

Same issue shows twice in project's column #27639

stuzer05 opened this issue Oct 16, 2023 · 11 comments · Fixed by #30190
Assignees
Milestone

Comments

@stuzer05
Copy link
Contributor

stuzer05 commented Oct 16, 2023

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

6c501b1

Operating System

No response

How are you running Gitea?

binary

Database

None

@edlerd
Copy link

edlerd commented Oct 16, 2023

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

@stuzer05
Copy link
Contributor Author

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

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

@edlerd
Copy link

edlerd commented 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.

@stuzer05
Copy link
Contributor Author

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

@techknowlogick
Copy link
Member

@stuzer05 which database are you using?

@lunny
Copy link
Member

lunny commented Oct 16, 2023

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

@stuzer05
Copy link
Contributor Author

stuzer05 commented Oct 16, 2023

@stuzer05 which database are you using?

postgres

@edlerd
Copy link

edlerd commented Oct 17, 2023

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

@stuzer05
Copy link
Contributor Author

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

@edlerd
Copy link

edlerd commented 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 added a commit to edlerd/gitea that referenced this issue Oct 20, 2023
User reported in go-gitea#27639 that the same issue appears twice on their board. This fixes the source of duplication.

Fixes go-gitea#27639

Signed-off-by: David Edler <david.edler@canonical.com>
@lng2020
Copy link
Member

lng2020 commented Oct 23, 2023

Not sure if it's connected with #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.

@lunny lunny added this to the 1.23.0 milestone Apr 2, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.