Problem/Motivation

I noticed that while Open Atrium time_sheet does report tracked hours with deductions, view time_tracker/atrium_reports can not be modified to exclude deductions. There is no Field to include Deductions to report in Views UI.
Example: I start with a project in the morning at 9, have a 3 hours long break and end my day at 18. Time sheet shows that I've done 6 hours of (billable) work. Time tracker report shows I've done 9 hours of (billable) work.

Proposed resolution

  • Either add deduction to the "Duration" field in time_tracker/atrium_reports
  • OR add another column including deductions and third which has tracked time and deductions combined.
  • FIRST AID could be to set deductions -field selectable in Views UI. I don't know how to do it my self, though.

At this point time_tracker/atrium_reports is not very usable if you do have any breaks during tasks. User need to stop and report every time and Start timer -button turning to Resume -button is a bit confusing to user.

Comments

codi’s picture

Assigned: Unassigned » codi
Status: Active » Needs work

Ok, so for now I've added the deductions field as a field accessible by views. You'll find that in the latest dev. I'll have to update the view in the atrium feature to reflect the new field which I'll do in the next couple of days.

rpsu’s picture

Thanks. However there seems to be an error in query in 'time_tracker.views.inc', in time_tracker_node_join_handler::join(). Query fails, since on JOIN left field is missing table name ("ON .nid"):
LEFT JOIN (SELECT SUM(`duration`) as total_time, `nid` FROM time_tracker_entry GROUP BY nid) as node_time_tracker_entry__time_tracker_totals ON .nid = node_time_tracker_entry__time_tracker_totals.ni

codi’s picture

Which view is this happening on? Are you able to attach an export of the view?

drclaw’s picture

Status: Needs work » Fixed

Added a new time tracker field available to views for duration minus deductions called "Total Duration". (http://drupalcode.org/project/time_tracker.git/commit/e4f7257f8f65889bc2...) You may need to re-save the view to see the changes properly (if it's a views calc table), and you'll definitely need a cache clear. =)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rpsu’s picture

Hi,

Sorry for missing your original question.

I installed this version and see changes - nice, thanks!

Now including Total time works fine, however I can SUM up with Views Calc Table -view style only Time without deductions, not Deductions or Total time (including deducitons). I tried to look your code commit, but got confused - it looks like you have actually excluded that part? However I am aware that I probably misunderstood something...

rpsu’s picture

Status: Closed (fixed) » Needs work

opening this again

rpsu’s picture

Status: Needs work » Closed (fixed)

Sorry! Probably did not clear cache at right time... Works as expected! Thank you!

drclaw’s picture

Yes!

drclaw’s picture

Issue summary: View changes

edited issue a bit clearer