]> source.dussan.org Git - gitea.git/commit
Add default board to new projects, remove uncategorized pseudo-board (#29874)
authorDenys Konovalov <kontakt@denyskon.de>
Wed, 27 Mar 2024 20:54:32 +0000 (21:54 +0100)
committerGitHub <noreply@github.com>
Wed, 27 Mar 2024 20:54:32 +0000 (20:54 +0000)
commite5160185ed65fd1c2bcb2fc7dc7e0b5514ddb299
tree445f8d17503819eca709297093832c69ee1830a3
parent4eb86d68233241d53cff1009ecff17ac35efccd4
Add default board to new projects, remove uncategorized pseudo-board (#29874)

On creation of an empty project (no template) a default board will be
created instead of falling back to the uneditable pseudo-board.

Every project now has to have exactly one default boards. As a
consequence, you cannot unset a board as default, instead you have to
set another board as default. Existing projects will be modified using a
cron job, additionally this check will run every midnight by default.

Deleting the default board is not allowed, you have to set another board
as default to do it.

Fixes #29873
Fixes #14679 along the way
Fixes #29853

Co-authored-by: delvh <dev.lh@web.de>
17 files changed:
models/fixtures/project.yml
models/fixtures/project_board.yml
models/issues/issue_project.go
models/migrations/fixtures/Test_CheckProjectColumnsConsistency/project.yml [new file with mode: 0644]
models/migrations/fixtures/Test_CheckProjectColumnsConsistency/project_board.yml [new file with mode: 0644]
models/migrations/migrations.go
models/migrations/v1_22/v292.go [new file with mode: 0644]
models/migrations/v1_22/v292_test.go [new file with mode: 0644]
models/project/board.go
models/project/board_test.go [new file with mode: 0644]
models/project/project_test.go
options/locale/locale_en-US.ini
routers/web/org/projects.go
routers/web/repo/projects.go
routers/web/web.go
templates/projects/view.tmpl
web_src/js/features/repo-projects.js