-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add project column choice option on issue sidebar #30617
base: main
Are you sure you want to change the base?
Add project column choice option on issue sidebar #30617
Conversation
Signed-off-by: a1012112796 <[email protected]>
Signed-off-by: a1012112796 <[email protected]>
A change comment need to be created when switching successfully. |
That's another feature which is out of the topic of current pull request... |
Signed-off-by: a1012112796 <[email protected]>
No, I don't think so. It should be created with the same database transaction. |
see #30703, it's not a small change like what you see... |
Considering multi project support, maybe using modal later is a good choice. |
Please resolve the conflicts, sorry the rename PR results in conflicts. |
…_option Signed-off-by: a1012112796 <[email protected]>
Signed-off-by: a1012112796 <[email protected]>
Signed-off-by: a1012112796 <[email protected]>
Signed-off-by: a1012112796 <[email protected]>
Signed-off-by: a1012112796 <[email protected]>
@@ -28,6 +28,25 @@ func (issue *Issue) LoadProject(ctx context.Context) (err error) { | |||
return err | |||
} | |||
|
|||
func (issue *Issue) LoadProjectIssue(ctx context.Context) (err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use LoadProject
directly?
@@ -58,17 +58,17 @@ func (Column) TableName() string { | |||
} | |||
|
|||
// NumIssues return counter of all issues assigned to the column | |||
func (c *Column) NumIssues(ctx context.Context) int { | |||
func (c *Column) NumIssues(ctx context.Context) (int64, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function is used by template/projects/view.tmpl
, you need also to change that place.
} | ||
defer committer.Close() | ||
|
||
num, err := toColumn.NumIssues(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not right. If you update two columns, then they will have the same sorting
.
example: