Velocities backwards #4

Open
jrfoell opened this Issue Feb 21, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@jrfoell

jrfoell commented Feb 21, 2011

Separate issue, but it should be noted that this plugin requires the TimingAndEstimationPlugin: http://trac-hacks.org/wiki/TimingAndEstimationPlugin

I noticed that on a task I entered where I finished before the estimate, the velocity was below 1.0, and it should have been above. Fixed with this change:

diff --git a/evidence/user_ebs.py b/evidence/user_ebs.py
index 02fc196..7451572 100644
--- a/evidence/user_ebs.py
+++ b/evidence/user_ebs.py
@@ -38,11 +38,11 @@ class EvidenceSchedulingUser(Component):
         user = re.match(r'/ebs/user/([\w_][\d\w_]+)/?$', req.path_info).group(1)
         db = self.env.get_db_cnx()
         velocities, hist = get_estimation_history(db, user)
-        avg = float(sum(velocities) / len(velocities))
+        avg = float(len(velocities) / sum(velocities))
 
         latest = [
             {
-                'cont': "%.1f" % (hist[tick_id]['time_total'] / hist[tick_id]['time_estimated']),
+                'cont': "%.1f" % (hist[tick_id]['time_estimated'] / hist[tick_id]['time_total']),
                 'href' : req.href.ticket(tick_id),
                 'title' : 'ticket #%d - %s' % (tick_id, hist[tick_id]['title']),
                 
@ironsmile

This comment has been minimized.

Show comment Hide comment
@ironsmile

ironsmile Feb 24, 2011

Contributor

Hi and thank you, jrfoell.

Adding an requirements section in the README might just be an good idea.

On the real issue here - velocities. I am not sure which is the best thing to do. My best argument for showing (total / estimated) = X is that most of the time it would be above 1 and you would be able to say "that task took me X times more... err time" referring to the number show.

Contributor

ironsmile commented Feb 24, 2011

Hi and thank you, jrfoell.

Adding an requirements section in the README might just be an good idea.

On the real issue here - velocities. I am not sure which is the best thing to do. My best argument for showing (total / estimated) = X is that most of the time it would be above 1 and you would be able to say "that task took me X times more... err time" referring to the number show.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment