Time Report grouped by user
I recently implemented the Time Tracking in my organization.
Each developer needs to log their time spent working on the various issues.
I need to create a weekly report which will display how long each Developer spent that week, broken out by Time Type.
The default report in the Time tab under AllProjects, reports on exactly what I am looking for. However I need to be able to group this data by user. So instead of clicking on each user 1 at a time, I want to know if there is a report somewhere which already has this information?
rlevine
· 1 |
|
Tuesday, August 3, 2010, 5:13:25 AM |
![]() 0
![]() |
You should be able to Control-Click to select multiple Resources. |
||||
|
![]() 0
![]() |
Yes I can, which can be cumbersome when there are a lot of users. It would be nice if we can save it similar to saved filters. |
||||
|
![]() 0
![]() |
Understood. |
||||
|
![]() 0
![]() |
Ok, thanks Harvey. Looking forward to this, as it will make my life a lot easier. |
||||
|
![]() 0
![]() |
I would be extremely grateful if you could formally log your requests @ http://gemini.countersoft.com ! |
||||
|
![]() 0
![]() |
Created GEM-4085 . |
||||
|
![]() 0
![]() |
I am posting this in case anybody else wants to make use of it. I created these 2 TSql queries/scripts. IF OBJECTID('tempdb..#temp') IS NOT NULL drop table #temp select * into #temp from ( SELECT time.entryid as id, usr.firstname + ' ' + usr.surname as [UserName], proj.projectcode as projectcode, proj.projectname as projectname, issue.issueid as issueid, issue.summary as issuesummary, time.hours as hourslogged, time.minutes as minuteslogged, time.comment as timecomment, timetype.timetypename as timetype, time.timeentrydate as timefor, time.created as timeentereddate, CONVERT(numeric(6,2),0) as timetyperunningtotal, CONVERT(numeric(6,2),0) as userrunningtotal FROM geminitimetracking time join geminiusers usr on time.userid = usr.userid join geminiissues issue on time.issueid = issue.issueid join geminiprojects proj on time.projectid = proj.projectid left join geminiissuetimetype timetype on time.timetypeid = timetype.timetypeID ) timereport where timefor between DATEADD(wk, DATEDIFF(wk, 6, DATEADD(wk,-1, getdate())), 6) and DATEADD(wk, DATEDIFF(wk, 5, DATEADD(wk,-1, getdate())), 5) order by UserName, timetype, timefor, projectcode, issueid declare @Id int declare @UserName varchar(150) declare @ProjectCode varchar(20) declare @ProjectName varchar(50) declare @IssueId int declare @IssueSummary varchar(2000) declare @HoursLogged smallint declare @MinutesLogged smallint declare @TimeComment varchar(2000) declare @TimeType varchar(50) declare @TimeFor as Date declare @TimeEntered DateTime declare @RunningTotal float declare @RunningHours int declare @RunningMinutes int declare @LastUser varchar(150) = '' declare @LastTT varchar(50) = '' declare @TTRunningTotal float declare @TTRunningHours int declare @TTRunningMinutes int DECLARE @cur CURSOR SET @cur = CURSOR STATIC FOR select from #temp order by UserName, time_type, time_for, project_code, issue_id OPEN @cur FETCH @cur INTO @Id,@UserName,@ProjectCode,@ProjectName,@IssueId,@IssueSummary,@HoursLogged,@MinutesLogged,@TimeComment,@TimeType,@TimeFor,@TimeEntered,@TTRunningTotal,@RunningTotal WHILE (@@FETCH_STATUS <> -1) BEGIN if (@UserName <> @LastUser) begin set @RunningTotal = 0 set @RunningHours = 0 set @RunningMinutes = 0 set @TTRunningTotal = 0 set @TTRunningHours = 0 set @TTRunningMinutes = 0 end else if (@TimeType <> @LastTT) begin set @TTRunningTotal = 0 set @TTRunningHours = 0 set @TTRunningMinutes = 0 end set @RunningHours = @RunningHours + @HoursLogged set @RunningMinutes = @RunningMinutes + @MinutesLogged set @RunningTotal = (@RunningHours + (@RunningMinutes/60)) + ((@RunningMinutes%60).01) set @TTRunningHours = @TTRunningHours + @HoursLogged set @TTRunningMinutes = @TTRunningMinutes + @MinutesLogged set @TTRunningTotal = (@TTRunningHours + (@RunningMinutes/60)) + ((@RunningMinutes%60)*.01) update #temp set timetyperunningtotal = @TTRunningTotal, userrunning_total = @RunningTotal where id = @Id set @LastUser = @UserName set @LastTT = @TimeType FETCH @cur INTO @Id,@UserName,@ProjectCode,@ProjectName,@IssueId,@IssueSummary,@HoursLogged,@MinutesLogged,@TimeComment,@TimeType,@TimeFor,@TimeEntered,@TTRunningTotal,@RunningTotal END CLOSE @cur DEALLOCATE @cur select * from #temp delete from #temp |
||||
|
![]() 0
![]() |
Thanks for sharing. |
||||
|