|
|
@ -619,10 +619,30 @@ def projectdetails(request, project_id):
|
|
|
|
|
|
|
|
|
|
|
|
project_notes = Note.objects.filter(project=project).order_by('-id')
|
|
|
|
project_notes = Note.objects.filter(project=project).order_by('-id')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
members = project.members.all()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for member in members:
|
|
|
|
|
|
|
|
tasks = project.task_set.filter(assigned_to=member)
|
|
|
|
|
|
|
|
total_time_seconds = 0
|
|
|
|
|
|
|
|
for task in tasks:
|
|
|
|
|
|
|
|
total_time_hours, total_time_minutes, total_time_seconds_task = task.total_task_time()
|
|
|
|
|
|
|
|
total_time_seconds += (total_time_hours * 3600) + (total_time_minutes * 60) + total_time_seconds_task
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
total_time_hours = total_time_seconds // 3600
|
|
|
|
|
|
|
|
total_time_minutes = (total_time_seconds % 3600) // 60
|
|
|
|
|
|
|
|
total_time_seconds = total_time_seconds % 60
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
member.total_time_worked_hours = total_time_hours
|
|
|
|
|
|
|
|
member.total_time_worked_minutes = total_time_minutes
|
|
|
|
|
|
|
|
member.total_time_worked_seconds = total_time_seconds
|
|
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
context = {
|
|
|
|
'project': project,
|
|
|
|
'project': project,
|
|
|
|
'epics': epics,
|
|
|
|
'epics': epics,
|
|
|
|
'project_notes' : project_notes,
|
|
|
|
'project_notes' : project_notes,
|
|
|
|
|
|
|
|
'members': members,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return render(request, 'details_templates/project-details.html', context)
|
|
|
|
return render(request, 'details_templates/project-details.html', context)
|
|
|
|