Opened 9 years ago

Closed 9 years ago

Using comments to add hours/minutes to tickets

Reported by: Owned by: Jeff Hammel Jeff Hammel normal TracHoursPlugin minor robashton@…, public@… 0.11

Description

I was looking around, and while this looks by far to be the best time tracking plug-in, as far as I can see it's not possible to automatically add hours and minutes by writing something in the check-in comment.

the TimingAndEstimationPlugin does it, and I read a comment by one of your developers saying that the way that that plug-in does it is not satisfactory, and that if it were to be added in the future it would have to be done using one of the entry points provided by the Trac API (?).

Was this ever looked at again? It's quite a lot of extra legwork to be going into Trac and adding hours/minutes and comments to a task, when I've already written that comment as part of a check-in.

comment:1 Changed 9 years ago by Jeff Hammel

CCing original ticket author, robashton@...

comment:2 Changed 9 years ago by Jeff Hammel

i'm now looking at how to do this. This is slated for TracHours 1.0 (which might actually not be 1.0, but that's a different story. in any case, the next "major release of TracHours"). However, in doing this I am not sure how to deal with a few issues:

• what format are hours added in? [7 hours]? 7 hours? other

• what if there is more than one hours entry per ticket comment? are all of them added? is it an error?
• what do you do if someone adds hours and doesn't have permission?

comment:3 Changed 9 years ago by Jeff Hammel

Resolution: → fixed new → closed

(In [5296]) * add ability to add hours via ticket comments, fixes #4372

• separate add_ticket_hours into a separate function; should actually be a non-bound function
• fix setup.py cruft
• bump version, as this is a major change

comment:5 follow-up:  7 Changed 9 years ago by public@…

Cc: public@… added fixed normal → minor closed → reopened

Small bug in line 247 of hours.py from [5296]:

seconds = 3600.0*float(hours) + 60.0*float(minutes)/60.0


needs to be changed to

seconds = 3600.0*float(hours) + 60.0*float(minutes)


Otherwise the minutese in the "2:30 hours" syntax don't get added.

Regards, Milan

comment:6 Changed 9 years ago by Jeff Hammel

Resolution: → fixed reopened → closed

(In [5372]) remove erroneous division by 60.0, fixes #4372

comment:7 in reply to:  5 Changed 9 years ago by Jeff Hammel

Small bug in line 247 of hours.py from [5296]:

seconds = 3600.0*float(hours) + 60.0*float(minutes)/60.0


needs to be changed to

seconds = 3600.0*float(hours) + 60.0*float(minutes)


Otherwise the minutese in the "2:30 hours" syntax don't get added.

Regards, Milan

Fixed now, thanks for the heads up!

Modify Ticket

Change Properties