1
0

feat(views): sort tasks by their position relative to the view they're in

This commit is contained in:
kolaente
2024-03-14 22:55:18 +01:00
parent 2502776460
commit d1d07f462c
6 changed files with 53 additions and 6 deletions

View File

@ -193,6 +193,14 @@ func (tf *TaskCollection) ReadAll(s *xorm.Session, a web.Auth, search string, pa
opts.page = page
opts.perPage = perPage
if view != nil {
opts.sortby = append(opts.sortby, &sortParam{
projectViewID: view.ID,
sortBy: taskPropertyPosition,
orderBy: orderAscending,
})
}
shareAuth, is := a.(*LinkSharing)
if is {
project, err := GetProjectSimpleByID(s, shareAuth.ProjectID)