Page MenuHomePhabricator

Make Phrequent time accounting aware of the stack
ClosedPublic

Authored by epriestley on Oct 18 2013, 7:02 PM.
Tags
None
Referenced Files
F14387404: D7349.diff
Sat, Dec 21, 2:43 PM
Unknown Object (File)
Fri, Dec 13, 6:08 PM
Unknown Object (File)
Thu, Dec 12, 11:30 PM
Unknown Object (File)
Mon, Dec 9, 4:14 AM
Unknown Object (File)
Mon, Dec 9, 4:14 AM
Unknown Object (File)
Mon, Dec 9, 4:14 AM
Unknown Object (File)
Mon, Dec 9, 4:14 AM
Unknown Object (File)
Thu, Dec 5, 11:15 AM

Details

Reviewers
btrahan
Maniphest Tasks
Restricted Maniphest Task
T3569: Make Phrequent somewhat usable
Commits
Restricted Diffusion Commit
rP943080a4de3f: Make Phrequent time accounting aware of the stack
Summary

Ref T3569. Fixes T3567. When figuring out how much time has been spent on an object, subtract "preemptive" events which interrupted the object.

Also, make the UI look vaguely sane:

{F72773}

Test Plan

Added a bunch of unit tests, mucked around in the UI.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Looks good

src/applications/phrequent/storage/PhrequentUserTime.php
28

sentence seems off

src/applications/phrequent/storage/PhrequentUserTime.php
28

i do not sentence good

I noticed a slight issue after applying this patch. I don't know whether it's a bug or an expected behaviour.

I noticed a bug after applying this patch:

Steps to reproduce:

  1. Pick a task you worked on sometime ago. (I picked something I worked on 2 days ago for total of 20 seconds)
  2. Click "Start working"

Exected:
Green clock and "22 s" or something like that

Got:
Green clock and "2 d"

Update regarding my issue:

I am seeing the issue with only one of my tasks. I think this is probably because I meddled with the mysql tables. So it's not likely a bug with this patch.

Your expected behavior is also my expected behavior, so let me know if you can repro. There might be some bugs in this somewhere -- it's not super simple and the unit tests only give me okayish confidence in it.

@epriestley, I got this error when I tried to start tracking a task.

src/applications/phrequent/storage/PhrequentTimeBlock.php
76

I am getting an error when I try to start tracking time on a task which hasn't had any activity on it:

Undefined variable: range_start

Full trace:{P952}

@epriestley - I can reproduce the "2 d" error, but I don't know why it's coming. Doesn't happen with anything except 1 task.

these are the contents of my phrequent table: {P953}