fix(views): do not return kanban tasks multiple times
This commit is contained in:
parent
27cb6e3372
commit
004f1e06bb
@ -261,7 +261,9 @@ func (d *dbTaskSearcher) Search(opts *taskSearchOptions) (tasks []*Task, totalCo
|
|||||||
limit, start := getLimitFromPageIndex(opts.page, opts.perPage)
|
limit, start := getLimitFromPageIndex(opts.page, opts.perPage)
|
||||||
cond := builder.And(builder.Or(projectIDCond, favoritesCond), where, filterCond)
|
cond := builder.And(builder.Or(projectIDCond, favoritesCond), where, filterCond)
|
||||||
|
|
||||||
query := d.s.Where(cond)
|
query := d.s.
|
||||||
|
Distinct("tasks.*").
|
||||||
|
Where(cond)
|
||||||
if limit > 0 {
|
if limit > 0 {
|
||||||
query = query.Limit(limit, start)
|
query = query.Limit(limit, start)
|
||||||
}
|
}
|
||||||
|
@ -922,7 +922,7 @@ func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buckets := make(map[int64]*Bucket)
|
buckets := make(map[int64]*Bucket)
|
||||||
err = s.In("project_project_id",
|
err = s.In("project_view_id",
|
||||||
builder.Select("id").
|
builder.Select("id").
|
||||||
From("project_views").
|
From("project_views").
|
||||||
Where(builder.Eq{"project_id": t.ProjectID}),
|
Where(builder.Eq{"project_id": t.ProjectID}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user