File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ func (issue *Issue) LoadProjectIssue(ctx context.Context) (err error) {
42
42
return err
43
43
}
44
44
45
+ issue .ProjectIssue .Project = issue .Project
46
+
45
47
return issue .ProjectIssue .LoadProjectColumn (ctx )
46
48
}
47
49
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ import (
14
14
15
15
// ProjectIssue saves relation from issue to a project
16
16
type ProjectIssue struct { //revive:disable-line:exported
17
- ID int64 `xorm:"pk autoincr"`
18
- IssueID int64 `xorm:"INDEX"`
19
- ProjectID int64 `xorm:"INDEX"`
17
+ ID int64 `xorm:"pk autoincr"`
18
+ IssueID int64 `xorm:"INDEX"`
19
+ ProjectID int64 `xorm:"INDEX"`
20
+ Project * Project `xorm:"-"`
20
21
21
22
// ProjectColumnID should not be zero since 1.22. If it's zero, the issue will not be displayed on UI and it might result in errors.
22
23
ProjectColumnID int64 `xorm:"'project_board_id' INDEX"`
@@ -70,6 +71,11 @@ func (issue *ProjectIssue) LoadProjectColumn(ctx context.Context) error {
70
71
71
72
var err error
72
73
74
+ if issue .ProjectColumnID == 0 {
75
+ issue .ProjectColumn , err = issue .Project .GetDefaultColumn (ctx )
76
+ return err
77
+ }
78
+
73
79
issue .ProjectColumn , err = GetColumn (ctx , issue .ProjectColumnID )
74
80
return err
75
81
}
You can’t perform that action at this time.
0 commit comments