Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#4417 closed enhancement (fixed)

adding hours via the post-commit hook

Reported by: k0s Owned by: k0s
Priority: normal Component: TracHoursPlugin
Severity: normal Keywords:
Cc: public@… Trac Release: 0.11

Description

in that same way that RepositoryHookSystemPlugin has source:repositoryhooksystemplugin/0.11/repository_hook/system/ticketchanger.py to close tickets, a plugin should be written to annote hours onto tickets via (e.g.) the SVN post-commit-hook. This could also be used to clock off of a ticket if the ticket is fixed

See also:

#4372

#4416

Attachments (0)

Change History (6)

comment:1 Changed 6 years ago by k0s

That is something like, if the commit message says:

"developing build infrastructure [2.5 hours:#14]"

this would add 2.5 hours to the counter in ticket #14. the hours description could just be the commit message.

comment:2 Changed 6 years ago by k0s

  • Status changed from new to assigned

comment:3 Changed 6 years ago by k0s

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

(In [5321]) * add hours through ticket commits, closes #4417

  • major change, bump version

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

What is the syntax which is supposed to work?

With RepositoryHookSystemPlugin disabled, the following examples work for me:

Test commit 67, refs #1, 0.3 hours spent
Test commit 67, refs #1, [0.3 hours]

This doesn't work:

Test commit [0.5 hours:#1]

(No comment is added to the resp. ticket.)

Any information / documentation on this? I hope adding additional messages to this bug is ok. I didn't reopen this ticket as the feature actually works.

Regards, Milan

PS:

comment:5 Changed 6 years ago by anonymous

  • Cc public@… added; anonymous removed

comment:6 in reply to: ↑ 4 Changed 6 years ago by anonymous

Replying to public@mjh.name:

What is the syntax which is supposed to work?

With RepositoryHookSystemPlugin disabled, the following examples work for me:

Test commit 67, refs #1, 0.3 hours spent
Test commit 67, refs #1, [0.3 hours]

This doesn't work:

Test commit [0.5 hours:#1]

(No comment is added to the resp. ticket.)

Any information / documentation on this? I hope adding additional messages to this bug is ok. I didn't reopen this ticket as the feature actually works.

Regards, Milan

PS:

No documentation yet. I haven't had time to update the documentation recently, nor do I think I will be able to soon. Please feel free/encouraged to do so, if it is important to you.

The format is the same used for ticket comments, which is

refs #1 this took 7 hours

In other words, you use refs #1 or closes #1 or any of the commit-hook syntax for dealing with tickets, then 7 hours or 7:30 hours or 7.5 hours will be added to the ticket. Without RepositoryHookSystemPlugin (that is, the default Trac post-commit hook), the hours will be recorded (I think) but will not get turned into a link to the /hours/1 page

Also note the eggregious bug #4791, which I will tackle as soon as I get a chance to program. All documentation and no programming make k0s a dull boy

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.