Beispiel #1
0
def list_bugtasks(request, projectname, group=False):
    page_type = "bugtasks"

    ref, projects = utils.retrieve_projects(projectname, group)
    bugcount = Task.objects.filter(project__in=projects,
                                   story__is_bug=True,
                                   story__priority=0).count()
    bugtasks = Task.objects.filter(project__in=projects,
                                   story__is_bug=True,
                                   status__in=['T', 'R'])
    bugtasks = utils.order_results(request, page_type, bugtasks)

    p_size, p_count, p_number = utils.get_pagination(request, len(bugtasks))
    if p_size != -1:
        bugtasks = bugtasks[p_number * p_size: (p_number + 1) * p_size]

    arrow_object = utils.build_order_arrows_object(request, page_type)

    return render(request, "projects.list_tasks.html", {
        'title': "Active bug tasks",
        'page_type': page_type,
        'ref': ref,
        'is_group': group,
        'bugtriagecount': bugcount,
        'tasks': bugtasks,
        'page_count': p_count,
        'page_number': p_number,
        'page_size': p_size,
        'arrow_object': arrow_object,
        'is_bug': True,
    })
Beispiel #2
0
def list_bugtriage(request, projectname, group=False):
    ref, projects = retrieve_projects(projectname, group)
    tasks = Task.objects.filter(project__in=projects,
                                story__is_bug=True,
                                story__priority=0)
    bugcount = tasks.count()
    return render(request, "projects.list_tasks.html", {
        'title': "Bugs needing triage",
        'ref': ref,
        'is_group': group,
        'bugtriagecount': bugcount,
        'tasks': tasks,
        'is_bug': True,
    })
Beispiel #3
0
def list_bugtasks(request, projectname, group=False):
    ref, projects = retrieve_projects(projectname, group)
    bugcount = Task.objects.filter(project__in=projects,
                                   story__is_bug=True,
                                   story__priority=0).count()
    bugtasks = Task.objects.filter(project__in=projects,
                                   story__is_bug=True,
                                   status__in=['T', 'R'])
    return render(request, "projects.list_tasks.html", {
        'title': "Active bug tasks",
        'ref': ref,
        'is_group': group,
        'bugtriagecount': bugcount,
        'tasks': bugtasks,
        'is_bug': True,
    })
Beispiel #4
0
def dashboard(request, projectname, group=False):
    ref, projects = retrieve_projects(projectname, group)
    bugcount = Task.objects.filter(project__in=projects,
                                   story__is_bug=True,
                                   story__priority=0).count()
    if group:
        return render(request, "projects.group.html", {
            'ref': ref,
            'is_group': group,
            'bugtriagecount': bugcount,
        })
    return render(request, "projects.dashboard.html", {
        'ref': ref,
        'is_group': group,
        'bugtriagecount': bugcount,
    })