Fix unnecessary comment when moving issue on the same project column (#33496)

Fix #33482
This commit is contained in:
Lunny Xiao 2025-02-04 19:51:10 -08:00 committed by GitHub
parent a6819570be
commit 6999651b6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 17 deletions

View file

@ -38,13 +38,15 @@ func (issue *Issue) projectID(ctx context.Context) int64 {
}
// ProjectColumnID return project column id if issue was assigned to one
func (issue *Issue) ProjectColumnID(ctx context.Context) int64 {
func (issue *Issue) ProjectColumnID(ctx context.Context) (int64, error) {
var ip project_model.ProjectIssue
has, err := db.GetEngine(ctx).Where("issue_id=?", issue.ID).Get(&ip)
if err != nil || !has {
return 0
if err != nil {
return 0, err
} else if !has {
return 0, nil
}
return ip.ProjectColumnID
return ip.ProjectColumnID, nil
}
// LoadIssuesFromColumn load issues assigned to this column