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

Rename project board -> column to make the UI less confusing #30170

Merged
merged 35 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4372908
Rename project board -> column to make the UI less confusion
lunny Mar 29, 2024
49fce5d
rename more board -> column
lunny Mar 30, 2024
506f2ac
Merge branch 'main' into lunny/rename_board_column
lunny Mar 30, 2024
ff6a72d
Fix bug
lunny Mar 30, 2024
ecdc683
Merge branch 'main' into lunny/rename_board_column
lunny Mar 30, 2024
311a82f
Rename boardview type -> template type
lunny Mar 30, 2024
f3554db
Rename boardtype -> templatetype on template and form
lunny Mar 31, 2024
a0406b1
Merge branch 'main' into lunny/rename_board_column
lunny Mar 31, 2024
37eb84a
remove unnecessary comment
lunny Mar 31, 2024
42bec44
Merge branch 'main' into lunny/rename_board_column
lunny Apr 3, 2024
98c3344
Merge branch 'main' into lunny/rename_board_column
silverwind Apr 5, 2024
0ad9355
Merge branch 'main' into lunny/rename_board_column
lunny Apr 15, 2024
d876464
more renames
lunny Apr 16, 2024
3d0fad8
Merge branch 'main' into lunny/rename_board_column
lunny Apr 16, 2024
6dcbe27
Merge branch 'lunny/rename_board_column' of github.com:lunny/gitea in…
lunny Apr 16, 2024
e5cab92
more renames
lunny Apr 17, 2024
c40e7fc
Merge branch 'main' into lunny/rename_board_column
lunny Apr 18, 2024
e6a7fd3
Fix comment of boards
lunny Apr 18, 2024
925dcf8
Update models/project/column.go
lunny Apr 18, 2024
78f7639
Update documentation about boards
lunny Apr 18, 2024
09f90d2
Merge branch 'main' into lunny/rename_board_column
lunny Apr 18, 2024
125a13b
Merge branch 'lunny/rename_board_column' of github.com:lunny/gitea in…
lunny Apr 18, 2024
ee38355
Merge branch 'main' into lunny/rename_board_column
lunny Apr 19, 2024
b0d4084
More renames
lunny Apr 19, 2024
0444955
color-project-board-bg -> color-project-column-bg
silverwind Apr 21, 2024
d065f6f
Merge branch 'main' into lunny/rename_board_column
lunny Apr 23, 2024
4cb15a7
Merge branch 'lunny/rename_board_column' of github.com:lunny/gitea in…
lunny Apr 23, 2024
7682adc
Merge branch 'main' into lunny/rename_board_column
lunny Apr 28, 2024
61e8ad5
Fix locale
lunny Apr 30, 2024
b284b95
Merge branch 'main' into lunny/rename_board_column
lunny Apr 30, 2024
9109a85
Merge branch 'lunny/rename_board_column' of github.com:lunny/gitea in…
lunny Apr 30, 2024
d9e5f56
Merge branch 'main' into lunny/rename_board_column
lunny May 11, 2024
96122c5
More renames
lunny May 11, 2024
7a80a55
Merge branch 'main' into lunny/rename_board_column
GiteaBot May 27, 2024
65818e9
Merge branch 'main' into lunny/rename_board_column
GiteaBot May 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/administration/config-cheat-sheet.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ and

## Project (`project`)

Default templates for project boards:
Default templates for project board view:

- `PROJECT_BOARD_BASIC_KANBAN_TYPE`: **To Do, In Progress, Done**
- `PROJECT_BOARD_BUG_TRIAGE_TYPE`: **Needs Triage, High Priority, Low Priority, Closed**
Expand Down
2 changes: 1 addition & 1 deletion docs/content/index.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You can try it out using [the online demo](https://try.gitea.io/).

- CI/CD: Gitea Actions supports CI/CD functionality, compatible with GitHub Actions. Users can write workflows in familiar YAML format and reuse a variety of existing Actions plugins. Actions plugins support downloading from any Git website.

- Project Management: Gitea tracks project requirements, features, and bugs through boards and issues. Issues support features like branches, tags, milestones, assignments, time tracking, due dates, dependencies, and more.
- Project Management: Gitea tracks project requirements, features, and bugs through columns and issues. Issues support features like branches, tags, milestones, assignments, time tracking, due dates, dependencies, and more.

- Artifact Repository: Gitea supports over 20 different types of public or private software package management, including Cargo, Chef, Composer, Conan, Conda, Container, Helm, Maven, npm, NuGet, Pub, PyPI, RubyGems, Vagrant, and more.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/installation/comparison.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ _Symbols used in table:_
| Comment reactions | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Lock Discussion | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Batch issue handling | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Issue Boards (Kanban) | [/](https://github.com/go-gitea/gitea/issues/14710) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Projects | [/](https://github.com/go-gitea/gitea/issues/14710) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Create branch from issue | [✘](https://github.com/go-gitea/gitea/issues/20226) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Convert comment to new issue | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | ✘ |
| Issue search | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ |
Expand Down
2 changes: 1 addition & 1 deletion docs/content/usage/permissions.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ With different permissions, people could do different things with these units.
| Wiki | View wiki pages. Clone the wiki repository. | Create/Edit wiki pages, push | - |
| ExternalWiki | Link to an external wiki | - | - |
| ExternalTracker | Link to an external issue tracker | - | - |
| Projects | View the boards | Change issues across boards | - |
| Projects | View the columns of projects | Change issues across columns | - |
| Packages | View the packages | Upload/Delete packages | - |
| Actions | View the Actions logs | Approve / Cancel / Restart | - |
| Settings | - | - | Manage the repository |
Expand Down
4 changes: 2 additions & 2 deletions models/activities/statistic.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type Statistic struct {
Mirror, Release, AuthSource, Webhook,
Milestone, Label, HookTask,
Team, UpdateTask, Project,
ProjectBoard, Attachment,
ProjectColumn, Attachment,
Branches, Tags, CommitStatus int64
IssueByLabel []IssueByLabelCount
IssueByRepository []IssueByRepositoryCount
Expand Down Expand Up @@ -115,6 +115,6 @@ func GetStatistic(ctx context.Context) (stats Statistic) {
stats.Counter.Team, _ = e.Count(new(organization.Team))
stats.Counter.Attachment, _ = e.Count(new(repo_model.Attachment))
stats.Counter.Project, _ = e.Count(new(project_model.Project))
stats.Counter.ProjectBoard, _ = e.Count(new(project_model.Board))
stats.Counter.ProjectColumn, _ = e.Count(new(project_model.Column))
return stats
}
6 changes: 3 additions & 3 deletions models/issues/comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ const (
CommentTypeMergePull // 28 merge pull request
CommentTypePullRequestPush // 29 push to PR head branch

CommentTypeProject // 30 Project changed
CommentTypeProjectBoard // 31 Project board changed
CommentTypeProject // 30 Project changed
CommentTypeProjectColumn // 31 Project column changed

CommentTypeDismissReview // 32 Dismiss Review

Expand Down Expand Up @@ -146,7 +146,7 @@ var commentStrings = []string{
"merge_pull",
"pull_push",
"project",
"project_board",
"project_board", // FIXME: the name should be project_column
"dismiss_review",
"change_issue_ref",
"pull_scheduled_merge",
Expand Down
38 changes: 19 additions & 19 deletions models/issues/issue_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,32 +37,32 @@ func (issue *Issue) projectID(ctx context.Context) int64 {
return ip.ProjectID
}

// ProjectBoardID return project board id if issue was assigned to one
func (issue *Issue) ProjectBoardID(ctx context.Context) int64 {
// ProjectColumnID return project column id if issue was assigned to one
func (issue *Issue) ProjectColumnID(ctx context.Context) int64 {
var ip project_model.ProjectIssue
has, err := db.GetEngine(ctx).Where("issue_id=?", issue.ID).Get(&ip)
if err != nil || !has {
return 0
}
return ip.ProjectBoardID
return ip.ProjectColumnID
}

// LoadIssuesFromBoard load issues assigned to this board
func LoadIssuesFromBoard(ctx context.Context, b *project_model.Board) (IssueList, error) {
// LoadIssuesFromColumn load issues assigned to this column
func LoadIssuesFromColumn(ctx context.Context, b *project_model.Column) (IssueList, error) {
issueList, err := Issues(ctx, &IssuesOptions{
ProjectBoardID: b.ID,
ProjectID: b.ProjectID,
SortType: "project-column-sorting",
ProjectColumnID: b.ID,
ProjectID: b.ProjectID,
SortType: "project-column-sorting",
})
if err != nil {
return nil, err
}

if b.Default {
issues, err := Issues(ctx, &IssuesOptions{
ProjectBoardID: db.NoConditionID,
ProjectID: b.ProjectID,
SortType: "project-column-sorting",
ProjectColumnID: db.NoConditionID,
ProjectID: b.ProjectID,
SortType: "project-column-sorting",
})
if err != nil {
return nil, err
Expand All @@ -77,11 +77,11 @@ func LoadIssuesFromBoard(ctx context.Context, b *project_model.Board) (IssueList
return issueList, nil
}

// LoadIssuesFromBoardList load issues assigned to the boards
func LoadIssuesFromBoardList(ctx context.Context, bs project_model.BoardList) (map[int64]IssueList, error) {
// LoadIssuesFromColumnList load issues assigned to the columns
func LoadIssuesFromColumnList(ctx context.Context, bs project_model.ColumnList) (map[int64]IssueList, error) {
issuesMap := make(map[int64]IssueList, len(bs))
for i := range bs {
il, err := LoadIssuesFromBoard(ctx, bs[i])
il, err := LoadIssuesFromColumn(ctx, bs[i])
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -110,7 +110,7 @@ func IssueAssignOrRemoveProject(ctx context.Context, issue *Issue, doer *user_mo
return util.NewPermissionDeniedErrorf("issue %d can't be accessed by project %d", issue.ID, newProject.ID)
}
if newColumnID == 0 {
newDefaultColumn, err := newProject.GetDefaultBoard(ctx)
newDefaultColumn, err := newProject.GetDefaultColumn(ctx)
if err != nil {
return err
}
Expand Down Expand Up @@ -153,10 +153,10 @@ func IssueAssignOrRemoveProject(ctx context.Context, issue *Issue, doer *user_mo
}
newSorting := util.Iif(res.IssueCount > 0, res.MaxSorting+1, 0)
return db.Insert(ctx, &project_model.ProjectIssue{
IssueID: issue.ID,
ProjectID: newProjectID,
ProjectBoardID: newColumnID,
Sorting: newSorting,
IssueID: issue.ID,
ProjectID: newProjectID,
ProjectColumnID: newColumnID,
Sorting: newSorting,
})
})
}
14 changes: 7 additions & 7 deletions models/issues/issue_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type IssuesOptions struct { //nolint
SubscriberID int64
MilestoneIDs []int64
ProjectID int64
ProjectBoardID int64
ProjectColumnID int64
IsClosed optional.Option[bool]
IsPull optional.Option[bool]
LabelIDs []int64
Expand Down Expand Up @@ -169,12 +169,12 @@ func applyProjectCondition(sess *xorm.Session, opts *IssuesOptions) *xorm.Sessio
return sess
}

func applyProjectBoardCondition(sess *xorm.Session, opts *IssuesOptions) *xorm.Session {
// opts.ProjectBoardID == 0 means all project boards,
func applyProjectColumnCondition(sess *xorm.Session, opts *IssuesOptions) *xorm.Session {
// opts.ProjectColumnID == 0 means all project columns,
// do not need to apply any condition
if opts.ProjectBoardID > 0 {
sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Eq{"project_board_id": opts.ProjectBoardID}))
} else if opts.ProjectBoardID == db.NoConditionID {
if opts.ProjectColumnID > 0 {
sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Eq{"project_board_id": opts.ProjectColumnID}))
} else if opts.ProjectColumnID == db.NoConditionID {
sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Eq{"project_board_id": 0}))
}
return sess
Expand Down Expand Up @@ -246,7 +246,7 @@ func applyConditions(sess *xorm.Session, opts *IssuesOptions) *xorm.Session {

applyProjectCondition(sess, opts)

applyProjectBoardCondition(sess, opts)
applyProjectColumnCondition(sess, opts)

if opts.IsPull.Has() {
sess.And("issue.is_pull=?", opts.IsPull.Value())
Expand Down
24 changes: 12 additions & 12 deletions models/migrations/v1_22/v293_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@ import (

func Test_CheckProjectColumnsConsistency(t *testing.T) {
// Prepare and load the testing database
x, deferable := base.PrepareTestEnv(t, 0, new(project.Project), new(project.Board))
x, deferable := base.PrepareTestEnv(t, 0, new(project.Project), new(project.Column))
defer deferable()
if x == nil || t.Failed() {
return
}

assert.NoError(t, CheckProjectColumnsConsistency(x))

// check if default board was added
var defaultBoard project.Board
has, err := x.Where("project_id=? AND `default` = ?", 1, true).Get(&defaultBoard)
// check if default column was added
var defaultColumn project.Column
has, err := x.Where("project_id=? AND `default` = ?", 1, true).Get(&defaultColumn)
assert.NoError(t, err)
assert.True(t, has)
assert.Equal(t, int64(1), defaultBoard.ProjectID)
assert.True(t, defaultBoard.Default)
assert.Equal(t, int64(1), defaultColumn.ProjectID)
assert.True(t, defaultColumn.Default)

// check if multiple defaults, previous were removed and last will be kept
expectDefaultBoard, err := project.GetBoard(db.DefaultContext, 2)
expectDefaultColumn, err := project.GetColumn(db.DefaultContext, 2)
assert.NoError(t, err)
assert.Equal(t, int64(2), expectDefaultBoard.ProjectID)
assert.False(t, expectDefaultBoard.Default)
assert.Equal(t, int64(2), expectDefaultColumn.ProjectID)
assert.False(t, expectDefaultColumn.Default)

expectNonDefaultBoard, err := project.GetBoard(db.DefaultContext, 3)
expectNonDefaultColumn, err := project.GetColumn(db.DefaultContext, 3)
assert.NoError(t, err)
assert.Equal(t, int64(2), expectNonDefaultBoard.ProjectID)
assert.True(t, expectNonDefaultBoard.Default)
assert.Equal(t, int64(2), expectNonDefaultColumn.ProjectID)
assert.True(t, expectNonDefaultColumn.Default)
}
Loading