1
0

fix(tasks): get all tasks from parent projects

This commit is contained in:
kolaente
2023-01-07 12:41:11 +01:00
parent ceaa9c0e03
commit 537ba60f2d
7 changed files with 75 additions and 28 deletions

View File

@ -182,7 +182,7 @@ func (tf *TaskCollection) ReadAll(s *xorm.Session, a web.Auth, search string, pa
// This allows to use this function in Task.ReadAll with a possibility to deprecate the latter at some point.
var projects []*Project
if tf.ProjectID == 0 {
projectMap, _, _, err := getRawProjectsForUser(
projects, _, _, err = getRawProjectsForUser(
s,
&projectOptions{
user: &user.User{ID: a.GetID()},
@ -192,9 +192,6 @@ func (tf *TaskCollection) ReadAll(s *xorm.Session, a web.Auth, search string, pa
if err != nil {
return nil, 0, 0, err
}
for _, project := range projectMap {
projects = append(projects, project)
}
} else {
// Check the project exists and the user has access on it
project := &Project{ID: tf.ProjectID}