fix(tasks): don't check for namespaces in filters
This commit is contained in:
parent
7c448c88a8
commit
5d02d93d31
@ -333,7 +333,7 @@ func getRawTasksForProjects(s *xorm.Session, projects []*Project, a web.Auth, op
|
|||||||
reminderFilters := []builder.Cond{}
|
reminderFilters := []builder.Cond{}
|
||||||
assigneeFilters := []builder.Cond{}
|
assigneeFilters := []builder.Cond{}
|
||||||
labelFilters := []builder.Cond{}
|
labelFilters := []builder.Cond{}
|
||||||
namespaceFilters := []builder.Cond{}
|
projectFilters := []builder.Cond{}
|
||||||
|
|
||||||
var filters = make([]builder.Cond, 0, len(opts.filters))
|
var filters = make([]builder.Cond, 0, len(opts.filters))
|
||||||
// To still find tasks with nil values, we exclude 0s when comparing with >/< values.
|
// To still find tasks with nil values, we exclude 0s when comparing with >/< values.
|
||||||
@ -371,13 +371,13 @@ func getRawTasksForProjects(s *xorm.Session, projects []*Project, a web.Auth, op
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if f.field == "namespace" || f.field == "namespace_id" {
|
if f.field == "parent_project" || f.field == "parent_project_id" {
|
||||||
f.field = "namespace_id"
|
f.field = "parent_project_id"
|
||||||
filter, err := getFilterCond(f, opts.filterIncludeNulls)
|
filter, err := getFilterCond(f, opts.filterIncludeNulls)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, 0, err
|
return nil, 0, 0, err
|
||||||
}
|
}
|
||||||
namespaceFilters = append(namespaceFilters, filter)
|
projectFilters = append(projectFilters, filter)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -456,13 +456,13 @@ func getRawTasksForProjects(s *xorm.Session, projects []*Project, a web.Auth, op
|
|||||||
filters = append(filters, getFilterCondForSeparateTable("label_tasks", opts.filterConcat, labelFilters))
|
filters = append(filters, getFilterCondForSeparateTable("label_tasks", opts.filterConcat, labelFilters))
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(namespaceFilters) > 0 {
|
if len(projectFilters) > 0 {
|
||||||
var filtercond builder.Cond
|
var filtercond builder.Cond
|
||||||
if opts.filterConcat == filterConcatOr {
|
if opts.filterConcat == filterConcatOr {
|
||||||
filtercond = builder.Or(namespaceFilters...)
|
filtercond = builder.Or(projectFilters...)
|
||||||
}
|
}
|
||||||
if opts.filterConcat == filterConcatAnd {
|
if opts.filterConcat == filterConcatAnd {
|
||||||
filtercond = builder.And(namespaceFilters...)
|
filtercond = builder.And(projectFilters...)
|
||||||
}
|
}
|
||||||
|
|
||||||
cond := builder.In(
|
cond := builder.In(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user