def iteration(request, projectID, iterationID): if project_api.can_user_access_project(request.user.id, projectID): projects = project_api.get_projects_for_user(request.user.id) project = project_api.get_project(projectID) if project == None: return redirect('/req/projects') association = UserAssociation.objects.get(user=request.user, project=project) iterations = project_api.get_iterations_for_project(project) iteration = project_api.get_iteration(iterationID) if iteration != None: stories = project_api.get_stories_for_iteration(iteration) else: stories = project_api.get_stories_with_no_iteration(project) context = { 'projects': projects, 'project': project, 'association': association, 'iterations': iterations, 'iteration': iteration, 'stories': stories, 'owns_project': project_api.user_owns_project(request.user, project) } if iteration == None: context['isIceBox'] = True return render(request, 'IterationDetail.html', context) else: # return HttpResponse("You cannot access project " + proj) return redirect('/req/projects')
def backlog(request, projectID, iterationID): if project_api.can_user_access_project(request.user.id, projectID): projects = project_api.get_projects_for_user(request.user.id) project = project_api.get_project(projectID) if project is None: return redirect('/req/projects') association = UserAssociation.objects.get( user=request.user, project=project) iterations = project_api.get_iterations_for_project(project) iteration = project_api.get_iteration(iterationID) priorities = Story.PRIORITY_CHOICES if iteration is not None: stories = project_api.get_stories_for_iteration(iteration) else: stories = project_api.get_stories_with_no_iteration(project) context = {'projects': projects, 'project': project, 'priorities': priorities, 'association': association, 'iterations': iterations, 'iteration': iteration, 'stories': stories, 'owns_project': project_api.user_owns_project(request.user, project) } return render(request, 'BacklogDetail.html', context) else: # return HttpResponse("You cannot access project " + proj) return redirect('/req/projects')
def backlog(request, projectID, iterationID): if project_api.can_user_access_project(request.user.id, projectID): projects = project_api.get_projects_for_user(request.user.id) project = project_api.get_project(projectID) if project is None: return redirect('/req/projects') association = UserAssociation.objects.get(user=request.user, project=project) iterations = project_api.get_iterations_for_project(project) iteration = project_api.get_iteration(iterationID) priorities = Story.PRIORITY_CHOICES if iteration is not None: stories = project_api.get_stories_for_iteration(iteration) else: stories = project_api.get_stories_with_no_iteration(project) context = { 'projects': projects, 'project': project, 'priorities': priorities, 'association': association, 'iterations': iterations, 'iteration': iteration, 'stories': stories, 'owns_project': project_api.user_owns_project(request.user, project) } return render(request, 'BacklogDetail.html', context) else: # return HttpResponse("You cannot access project " + proj) return redirect('/req/projects')
def iteration(request, projectID, iterationID): if project_api.can_user_access_project(request.user.id, projectID): projects = project_api.get_projects_for_user(request.user.id) project = project_api.get_project(projectID) if project == None: return redirect('/req/projects') association = UserAssociation.objects.get(user=request.user, project=project) iterations = project_api.get_iterations_for_project(project) iteration = project_api.get_iteration(iterationID) if iteration != None: stories = project_api.get_stories_for_iteration(iteration) else: stories = project_api.get_stories_with_no_iteration(project) context = {'projects' : projects, 'project' : project, 'association' : association, 'iterations' : iterations, 'iteration' : iteration, 'stories' : stories, 'owns_project' : project_api.user_owns_project(request.user,project) } if iteration == None: context['isIceBox'] = True return render(request, 'IterationDetail.html', context) else: # return HttpResponse("You cannot access project " + proj) return redirect('/req/projects')
def list_iterations_for_project(request, projectID): project = project_api.get_project(projectID) iterations = mdl_iteration.get_iterations_for_project(project) context = { 'project': project, 'iterations': iterations, 'owns_project': project_api.user_owns_project(request.user, project), } return render(request, 'SideBarIters.html', context)
def list_iterations_for_project_with_selection(request, projectID, iterationID): project = project_api.get_project(projectID) iterations = mdl_iteration.get_iterations_for_project(project) iteration = mdl_iteration.get_iteration(iterationID) context = { 'project' : project, 'iterations' : iterations, 'iteration' : iteration, 'owns_project' : project_api.user_owns_project(request.user,project), } if iteration == None: context['isIceBox'] = True return render(request, 'SideBarIters.html', context)
def list_iterations_for_project_with_selection(request, projectID, iterationID): project = project_api.get_project(projectID) iterations = mdl_iteration.get_iterations_for_project(project) iteration = mdl_iteration.get_iteration(iterationID) context = { 'project': project, 'iterations': iterations, 'iteration': iteration, 'owns_project': project_api.user_owns_project(request.user, project), } if iteration == None: context['isIceBox'] = True return render(request, 'SideBarIters.html', context)