diff --git a/frontend/src/views/project/ProjectKanban.vue b/frontend/src/views/project/ProjectKanban.vue index a627cf578..d4844cc2e 100644 --- a/frontend/src/views/project/ProjectKanban.vue +++ b/frontend/src/views/project/ProjectKanban.vue @@ -306,7 +306,7 @@ import TaskPositionService from '@/services/taskPosition' import TaskPositionModel from '@/models/taskPosition' const { - projectId = undefined, + projectId, view, } = defineProps<{ projectId: number, diff --git a/pkg/models/kanban.go b/pkg/models/kanban.go index 371cc5b09..fc9988f8e 100644 --- a/pkg/models/kanban.go +++ b/pkg/models/kanban.go @@ -163,7 +163,7 @@ func (b *Bucket) ReadAll(s *xorm.Session, auth web.Auth, search string, page int return buckets, len(buckets), int64(len(buckets)), nil } -func GetTasksInBucketsForView(s *xorm.Session, view *ProjectView, opts *taskSearchOptions, auth web.Auth) (bucketsWithTasks []*Bucket, err error) { +func GetTasksInBucketsForView(s *xorm.Session, view *ProjectView, projects []*Project, opts *taskSearchOptions, auth web.Auth) (bucketsWithTasks []*Bucket, err error) { // Get all buckets for this project buckets := []*Bucket{} @@ -255,7 +255,7 @@ func GetTasksInBucketsForView(s *xorm.Session, view *ProjectView, opts *taskSear } } - ts, _, total, err := getRawTasksForProjects(s, []*Project{{ID: view.ProjectID}}, auth, opts) + ts, _, total, err := getRawTasksForProjects(s, projects, auth, opts) if err != nil { return nil, err } diff --git a/pkg/models/task_collection.go b/pkg/models/task_collection.go index 07594a44f..51cc37cda 100644 --- a/pkg/models/task_collection.go +++ b/pkg/models/task_collection.go @@ -122,7 +122,7 @@ func getTaskFilterOptsFromCollection(tf *TaskCollection, projectView *ProjectVie func getTaskOrTasksInBuckets(s *xorm.Session, a web.Auth, projects []*Project, view *ProjectView, opts *taskSearchOptions) (tasks interface{}, resultCount int, totalItems int64, err error) { if view != nil { if view.BucketConfigurationMode != BucketConfigurationModeNone { - tasksInBuckets, err := GetTasksInBucketsForView(s, view, opts, a) + tasksInBuckets, err := GetTasksInBucketsForView(s, view, projects, opts, a) return tasksInBuckets, len(tasksInBuckets), int64(len(tasksInBuckets)), err } }