Ejemplo n.º 1
0
def related_projects():
    projects = Project.query \
        .join(Task) \
        .filter(assignee_filter()) \
        .filter(open_project_filter()) \
        .all()
    return Project.serialize_list(projects)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
def get_project_task_types(project_id):
    project = get_project_raw(project_id)
    return Project.serialize_list(project.task_types)
Ejemplo n.º 5
0
def get_project_status_automations(project_id):
    project = get_project_raw(project_id)
    return Project.serialize_list(project.status_automations)