|
|
@ -34,7 +34,17 @@ func (r *projectRepository) List(ctx context.Context, filter models.ProjectFilte |
|
|
|
sq = sq.Where(squirrel.Eq{"project_id": filter.IDs}) |
|
|
|
} |
|
|
|
if filter.Active != nil { |
|
|
|
sq = sq.Where(squirrel.Eq{"active": *filter.Active}) |
|
|
|
if filter.IncludeSemiActive { |
|
|
|
sq = sq.Where(squirrel.Or{ |
|
|
|
squirrel.Eq{"active": *filter.Active}, |
|
|
|
squirrel.Eq{"status_tag": []string{ |
|
|
|
"to do", "background", "on hold", "progress", |
|
|
|
}}, |
|
|
|
}) |
|
|
|
} else { |
|
|
|
sq = sq.Where(squirrel.Eq{"active": *filter.Active}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if filter.Expiring { |
|
|
|
sq = sq.Where("end_time IS NOT NULL") |
|
|
|