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

Wrong project_board_id for newly created issue #30701

Closed
bilogic opened this issue Apr 25, 2024 · 9 comments · Fixed by #30696
Closed

Wrong project_board_id for newly created issue #30701

bilogic opened this issue Apr 25, 2024 · 9 comments · Fixed by #30696

Comments

@bilogic
Copy link
Contributor

bilogic commented Apr 25, 2024

Description

image

If I create an issue and add it to a project, its project_board_id is 0, but it should not be.

Instead, project_board_id should either be the value of the default board or board with lowest sorting

Gitea Version

1.21.11+9-g0e20ccfe32

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

None

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 25, 2024

It seems a release blocker

Hmm, not a new problem, not that "blocker" .... the newly added issue should use "default board"

@wxiaoguang wxiaoguang added this to the 1.22.0 milestone Apr 25, 2024
@lunny
Copy link
Member

lunny commented Apr 25, 2024

That table column name should be renamed project_column_id, #30170 is the first step to correct the names.

@lunny
Copy link
Member

lunny commented Apr 26, 2024

This should be caused by #29874 and will be fixed by #30696

@bilogic
Copy link
Contributor Author

bilogic commented Apr 26, 2024

Will it be in the nightly release?

@lunny
Copy link
Member

lunny commented Apr 28, 2024

Will it be in the nightly release?

Yes, once it merged and I expect it can be backported to v1.22

@bilogic
Copy link
Contributor Author

bilogic commented Apr 28, 2024

I'm on 1.22.0-rc1 now, let me know what to do to test it. Thank you.

@KazzmanK
Copy link
Contributor

KazzmanK commented May 7, 2024

It is still created with 0 instead of default board ID.
Why it is not Okay ?

If i move issue to other column (board) and take it back, 0-> actual board id.

May be, having issue without actual appointments to be shown on currently default board is normal ?

@lunny
Copy link
Member

lunny commented May 7, 2024

Because v1.22, all project_issue should have a column id. 0 will not be displayed on the project board view UI. #30696 will fix this and will be backport to v1.22

@bilogic
Copy link
Contributor Author

bilogic commented May 7, 2024

It is still created with 0 instead of default board ID. Why it is not Okay ?

I have not come across any project that uses 0 as a database ID, it typically starts from 1 and null if it does not have an ID

lunny added a commit that referenced this issue May 8, 2024
# The problem
The previous implementation will start multiple POST requests from the
frontend when moving a column and another bug is moving the default
column will never be remembered in fact.

# What's changed

- [x] This PR will allow the default column to move to a non-first
position
- [x] And it also uses one request instead of multiple requests when
moving the columns
- [x] Use a star instead of a pin as the icon for setting the default
column action
- [x] Inserted new column will be append to the end
- [x] Fix #30701 the newly added issue will be append to the end of the
default column
- [x] Fix when deleting a column, all issues in it will be displayed
from UI but database records exist.
- [x] Add a limitation for columns in a project to 20. So the sorting
will not be overflow because it's int8.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue May 8, 2024
# The problem
The previous implementation will start multiple POST requests from the
frontend when moving a column and another bug is moving the default
column will never be remembered in fact.

# What's changed

- [x] This PR will allow the default column to move to a non-first
position
- [x] And it also uses one request instead of multiple requests when
moving the columns
- [x] Use a star instead of a pin as the icon for setting the default
column action
- [x] Inserted new column will be append to the end
- [x] Fix go-gitea#30701 the newly added issue will be append to the end of the
default column
- [x] Fix when deleting a column, all issues in it will be displayed
from UI but database records exist.
- [x] Add a limitation for columns in a project to 20. So the sorting
will not be overflow because it's int8.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
lunny added a commit that referenced this issue May 8, 2024
Backport #30696 by @lunny

# The problem
The previous implementation will start multiple POST requests from the
frontend when moving a column and another bug is moving the default
column will never be remembered in fact.

# What's changed

- [x] This PR will allow the default column to move to a non-first
position
- [x] And it also uses one request instead of multiple requests when
moving the columns
- [x] Use a star instead of a pin as the icon for setting the default
column action
- [x] Inserted new column will be append to the end
- [x] Fix #30701 the newly added issue will be append to the end of the
default column
- [x] Fix when deleting a column, all issues in it will be displayed
from UI but database records exist.
- [x] Add a limitation for columns in a project to 20. So the sorting
will not be overflow because it's int8.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants