def related_projects(): projects = Project.query \ .join(Task) \ .filter(assignee_filter()) \ .filter(open_project_filter()) \ .all() return Project.serialize_list(projects)
def related_projects(): """ Return all projects related to current user: open projects of which the user is part of the team. """ projects = (Project.query.join(Task).join(ProjectStatus).filter( build_team_filter()).filter(build_open_project_filter()).all()) return Project.serialize_list(projects)
def related_projects(): """ Return all projects related to current user: open projects with at least one task assigned to current user. """ projects = Project.query \ .join(Task) \ .filter(build_assignee_filter()) \ .filter(build_open_project_filter()) \ .all() return Project.serialize_list(projects)
def get_project_task_types(project_id): project = get_project_raw(project_id) return Project.serialize_list(project.task_types)
def get_project_status_automations(project_id): project = get_project_raw(project_id) return Project.serialize_list(project.status_automations)