feat: decouple views from projects #2217

Merged
konrad merged 97 commits from feature/decouple-views-from-projects into main 2024-03-19 19:16:14 +00:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 004f1e06bb - Show all commits

View File

@ -261,7 +261,9 @@ func (d *dbTaskSearcher) Search(opts *taskSearchOptions) (tasks []*Task, totalCo
limit, start := getLimitFromPageIndex(opts.page, opts.perPage)
cond := builder.And(builder.Or(projectIDCond, favoritesCond), where, filterCond)
query := d.s.Where(cond)
query := d.s.
Distinct("tasks.*").
Where(cond)
if limit > 0 {
query = query.Limit(limit, start)
}

View File

@ -922,7 +922,7 @@ func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) {
}
buckets := make(map[int64]*Bucket)
err = s.In("project_project_id",
err = s.In("project_view_id",
builder.Select("id").
From("project_views").
Where(builder.Eq{"project_id": t.ProjectID}),