Fix unnecessary comment when moving issue on the same project column (#33496)
Fix #33482
This commit is contained in:
parent
a6819570be
commit
6999651b6d
3 changed files with 31 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue