Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Velocities backwards #4

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

Velocities backwards #4

jrfoell opened this issue Feb 21, 2011 · 1 comment

Comments

@jrfoell
Copy link

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
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants