Skip to content

Commit 338e8bb

Browse files
authored
Kanban board suggestions (#2)
* 6543 suggestions * fix
1 parent 64430ed commit 338e8bb

File tree

10 files changed

+26
-28
lines changed

10 files changed

+26
-28
lines changed

.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ globals:
2222
hljs: false
2323
SimpleMDE: false
2424
u2fApi: false
25-
hljs: false
2625
Sortable: false
2726
Vue: false
2827

models/issue.go

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,17 @@ type Issue struct {
4343
MilestoneID int64 `xorm:"INDEX"`
4444
Milestone *Milestone `xorm:"-"`
4545
ProjectID int64 `xorm:"INDEX"`
46-
// If 0, then it has not been added to a specific board in the project
47-
ProjectBoardID int64 `xorm:"INDEX"`
48-
Project *Project `xorm:"-"`
49-
Priority int
50-
AssigneeID int64 `xorm:"-"`
51-
Assignee *User `xorm:"-"`
52-
IsClosed bool `xorm:"INDEX"`
53-
IsRead bool `xorm:"-"`
54-
IsPull bool `xorm:"INDEX"` // Indicates whether is a pull request or not.
55-
PullRequest *PullRequest `xorm:"-"`
56-
NumComments int
57-
Ref string
46+
ProjectBoardID int64 `xorm:"INDEX"` // If 0, then it has not been added to a specific board in the project
47+
Project *Project `xorm:"-"`
48+
Priority int
49+
AssigneeID int64 `xorm:"-"`
50+
Assignee *User `xorm:"-"`
51+
IsClosed bool `xorm:"INDEX"`
52+
IsRead bool `xorm:"-"`
53+
IsPull bool `xorm:"INDEX"` // Indicates whether is a pull request or not.
54+
PullRequest *PullRequest `xorm:"-"`
55+
NumComments int
56+
Ref string
5857

5958
DeadlineUnix timeutil.TimeStamp `xorm:"INDEX"`
6059

models/migrations/migrations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ var migrations = []Migration{
294294
NewMigration("Add commit id and stale to reviews", addReviewCommitAndStale),
295295
// v119 -> v120
296296
NewMigration("Fix migrated repositories' git service type", fixMigratedRepositoryServiceType),
297-
// v120 - v121
297+
// v120 -> v121
298298
NewMigration("Add owner_name on table repository", addOwnerNameOnRepository),
299299
// v120 -> v121
300300
NewMigration("add projects info to repository table", addProjectsInfo),

models/migrations/v104.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
4+
45
package migrations
56

67
import (
@@ -29,6 +30,5 @@ func removeLabelUneededCols(x *xorm.Engine) error {
2930
if err := dropTableColumns(sess, "label", "is_selected"); err != nil {
3031
return err
3132
}
32-
3333
return sess.Commit()
3434
}

models/migrations/v106.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
4+
45
package migrations
56

67
import (

models/migrations/v112.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
4+
45
package migrations
56

67
import (
78
"os"
89

910
"code.gitea.io/gitea/models"
10-
1111
"xorm.io/builder"
1212
"xorm.io/xorm"
1313
)

models/migrations/v96.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ func deleteOrphanedAttachments(x *xorm.Engine) error {
3636
return err
3737
}
3838

39-
_, err := x.ID(attachment.ID).NoAutoCondition().Delete(attachment)
39+
_, err := sess.ID(attachment.ID).NoAutoCondition().Delete(attachment)
4040
return err
4141
})
42+
4243
if err != nil {
4344
return err
4445
}

modules/setting/repository.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@ var (
3535
AccessControlAllowOrigin string
3636
UseCompatSSHURI bool
3737
DefaultCloseIssuesViaCommitsInAnyBranch bool
38-
39-
EnableKanbanBoard bool
40-
ProjectBoardBasicKanbanType []string
41-
ProjectBoardBugTriageType []string
42-
EnablePushCreateUser bool
43-
EnablePushCreateOrg bool
38+
EnablePushCreateUser bool
39+
EnablePushCreateOrg bool
40+
EnableKanbanBoard bool
41+
ProjectBoardBasicKanbanType []string
42+
ProjectBoardBugTriageType []string
4443

4544
// Repository editor settings
4645
Editor struct {

routers/repo/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,6 @@ func getBranchData(ctx *context.Context, issue *models.Issue) {
672672
ctx.Data["BaseBranch"] = pull.BaseBranch
673673
ctx.Data["HeadBranch"] = pull.HeadBranch
674674
ctx.Data["HeadUserName"] = pull.MustHeadUserName()
675-
ctx.Data["RequireSimpleMDE"] = true
676675
}
677676
}
678677

@@ -731,6 +730,7 @@ func ViewIssue(ctx *context.Context) {
731730
ctx.Data["RequireHighlightJS"] = true
732731
ctx.Data["RequireDropzone"] = true
733732
ctx.Data["RequireTribute"] = true
733+
ctx.Data["RequireSimpleMDE"] = true
734734
ctx.Data["IsProjectsEnabled"] = setting.Repository.EnableKanbanBoard
735735

736736
renderAttachmentSettings(ctx)

routers/user/profile.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,9 @@ func Profile(ctx *context.Context) {
192192
case "projects":
193193

194194
ctx.Data["OpenProjects"], err = models.GetProjects(models.ProjectSearchOptions{
195-
// RepoID: repo.ID,
196-
Page: -1,
197-
// IsClosed: uti,
198-
Type: models.IndividualType,
195+
Page: -1,
196+
IsClosed: util.OptionalBoolFalse,
197+
Type: models.IndividualType,
199198
})
200199
default:
201200
repos, count, err = models.SearchRepository(&models.SearchRepoOptions{

0 commit comments

Comments
 (0)