Modify

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#4372 closed defect (fixed)

Using comments to add hours/minutes to tickets

Reported by: k0s Owned by: k0s
Priority: normal Component: TracHoursPlugin
Severity: minor Keywords:
Cc: robashton@…, public@… Trac Release: 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.

Attachments (0)

Change History (7)

comment:1 Changed 6 years ago by k0s

CCing original ticket author, robashton@...

comment:2 Changed 6 years ago by k0s

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 6 years ago by k0s

  • Resolution set to fixed
  • Status changed from new to 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:4 Changed 6 years ago by k0s

see also #4417

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

  • Cc public@… added
  • Resolution fixed deleted
  • Severity changed from normal to minor
  • Status changed from closed to 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 6 years ago by k0s

  • Resolution set to fixed
  • Status changed from reopened to closed

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

comment:7 in reply to: ↑ 5 Changed 6 years ago by k0s

Replying to public@mjh.name:

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!

Add Comment

Modify Ticket

Action
as closed The owner will remain k0s.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.