|
|
|
@ -613,6 +613,7 @@ def projectdetails(request, project_id):
|
|
|
|
|
stories = UserStory.objects.filter(project=project).order_by('-id')
|
|
|
|
|
credentials = ProjectCredential.objects.filter(project=project).order_by('-id')
|
|
|
|
|
albums = ProjectFileAlbum.objects.filter(project=project).order_by('-id')
|
|
|
|
|
milestones = Milestone.objects.filter(project=project).order_by('-id')
|
|
|
|
|
|
|
|
|
|
all_tickets = Ticket.objects.filter(project=project)
|
|
|
|
|
all_tickets_with_update_date = all_tickets.annotate(
|
|
|
|
@ -641,6 +642,22 @@ def projectdetails(request, project_id):
|
|
|
|
|
member.total_time_worked_minutes = total_time_minutes
|
|
|
|
|
member.total_time_worked_seconds = total_time_seconds
|
|
|
|
|
|
|
|
|
|
for m in milestones:
|
|
|
|
|
tasks = project.task_set.filter(milestone=m)
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
m.total_time_worked_hours = total_time_hours
|
|
|
|
|
m.total_time_worked_minutes = total_time_minutes
|
|
|
|
|
m.total_time_worked_seconds = total_time_seconds
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context = {
|
|
|
|
|
'project': project,
|
|
|
|
|
'epics': epics,
|
|
|
|
@ -651,6 +668,7 @@ def projectdetails(request, project_id):
|
|
|
|
|
'albums': albums,
|
|
|
|
|
'statuses' : statuses,
|
|
|
|
|
'all_tickets_ordered': all_tickets_ordered,
|
|
|
|
|
'milestones': milestones,
|
|
|
|
|
'is_pinned': is_pinned,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|