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
F14076545: D7349.diff
Thu, Nov 21, 6:10 PM
Unknown Object (File)
Mon, Nov 18, 3:37 AM
Unknown Object (File)
Fri, Nov 15, 12:07 PM
Unknown Object (File)
Tue, Nov 12, 5:18 AM
Unknown Object (File)
Sun, Nov 10, 12:10 PM
Unknown Object (File)
Tue, Nov 5, 4:46 PM
Unknown Object (File)
Thu, Oct 24, 6:19 PM
Unknown Object (File)
Oct 20 2024, 11:00 PM

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

Branch
pstack
Lint
Lint Passed
Unit
Tests Passed

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
77

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}