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 board => column in projects #20985

Closed

Conversation

anbraten
Copy link
Contributor

@anbraten anbraten commented Aug 28, 2022

closes #13802

Changes

  • rename in go code
  • update tests
  • rename tables
  • add migration
  • rename in template files
  • rename in js
  • rename in styles
  • update english translation
  • test changes

@anbraten anbraten changed the title rename board => column rename board => column in projects Aug 28, 2022
@lonix1
Copy link
Contributor

lonix1 commented Aug 29, 2022

Wow that's a lot of work for something that seems so simple. Thanks for doing this.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 29, 2022
@anbraten
Copy link
Contributor Author

Wow that's a lot of work for something that seems so simple. Thanks for doing this.

I was quite surprised by that as well and therefore I would definitely only change the board term in this PR.

@remram44
Copy link

Does this change the API in any way? I seem mention of "board" as "project" in the permissions page, as one of the "units": https://docs.gitea.io/en-us/permissions/

@anbraten
Copy link
Contributor Author

Luckily the routes do not contain the term board and dont need to be changed as far as I can tell atm. I saw that permission init, but it should be still the same as well.

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Aug 30, 2022
@lunny lunny added this to the 1.18.0 milestone Aug 30, 2022
@anbraten anbraten marked this pull request as ready for review September 3, 2022 07:26

type (
// BoardType is used to represent a project board type
BoardType uint8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ColumnType?

@@ -77,13 +77,13 @@
</div>
<div class="ui container fluid padded" id="project-board">

<div class="board">
{{range $board := .Boards}}
<div class="project-board">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

project-column ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already use project-column in line 83 for an actual column. This is the div containing all columns, so I guess project-board is to wrong.

BoardType uint8

// Columns is a list of all project columns in a repository
Columns []*Column
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ColumnList maybe a better name since all of other places use xxxList.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will change that

return err
}

if _, err := sess.Exec("ALTER TABLE `project_issue` RENAME COLUMN `project_board_id` TO `project_column_id`;"); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in migrations.go there is a helper to rename columns because in some dbs (sqlite) renames don't actually work as expected

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean recreateTable? I am not sure how to use it, so it copies over all data from the old to the new column name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like there was no helper for renaming yet, so I added two tiny ones.

@lunny lunny modified the milestones: 1.18.0, 1.19.0 Oct 17, 2022
@lunny lunny mentioned this pull request Dec 25, 2022
15 tasks
@lunny lunny modified the milestones: 1.19.0, 1.20.0 Jan 31, 2023
@lunny
Copy link
Member

lunny commented Mar 25, 2023

Since #22767 is merged and there are so many conflicts here, I think creating a new PR to do the left refactor is easier than resolve all the conflicts.

@anbraten anbraten closed this Mar 25, 2023
@GiteaBot GiteaBot removed this from the 1.20.0 milestone Apr 23, 2023
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kanban "board" naming is misleading, Column is a better name
7 participants