How to quickly add tickets in Trac? [closed]
Asked Answered
D

6

9

It's very painful to add multiple tickets to Trac or to have it as your own todo list. That causes people to use their own task management tools so tasks are then spread all around.

Is there any plugin or macro that would quicken the process of adding a ticket?

Downcome answered 22/9, 2008 at 11:18 Comment(0)
T
7

If you're using Eclipse: Mylyn is perfect.

Otherwise you could always get the XML RPC plugin. http://trac-hacks.org/wiki/XmlRpcPlugin and roll your own little tool.

For quickly creating similar tickets, you could use the Clone plugin: http://trac-hacks.org/wiki/CloneTicketPlugin

Edit And I second Espen's idea with the SVN checkin hook, it works great for us, as well.

Tephrite answered 22/9, 2008 at 11:21 Comment(1)
I use and like Mylyn, but how does it solve this problem? Creating a new task is a pain: New > Task with the mouse, select the repo in the dialog box, that gives you a new window where you have to edit details, then submit. Am I missing a fast way to add tasks?Finalize
G
10

The following allows you to type a quick note. The note becomes a Trac ticket, assigned to yourself. I use this for very quick bugs and/or features I don't want to forget. Or, if I make up a feature I open then close a ticket for it, so I get full credit :) - j

#!/usr/bin/env python

'''
trac-bug: add bug/feature to current Trac project, from the command line.
Specify Trac project directory in TRAC_ENV environment variable.
'''


import os, sys

TRAC_ENV = os.environ.get('TRAC_ENV') or os.path.expanduser('~/trac/projectenv')
if not os.path.isdir(TRAC_ENV):
    print >>sys.stderr, "Set TRAC_ENV to the Trac project directory."
    sys.exit(2)

from trac.env import open_environment
from trac.ticket import Ticket
t = Ticket(open_environment(TRAC_ENV))

desc = ' '.join(sys.argv[1:])
info = dict(
    status='open', 
    owner=os.environ['USER'], reporter=os.environ['USER'],
    description = desc, summary=desc
)

t.populate(info)
num = t.insert()
if not num:
    print >>sys.stderr, "Ticket not created"
    print >>sys.stder, vals
    sys.exit(1)

print "Ticket #%d: %s" % (num,desc)
sys.exit(0)                 # all is well

Usage is brief:

$ trac-bug out of beer

Ticket #9: out of beer

Graniela answered 28/8, 2009 at 4:11 Comment(1)
See also P.Péter's link to TicketToTracScript, which uses the same approach but adds support for setting other fields of the ticket too.Sells
T
7

If you're using Eclipse: Mylyn is perfect.

Otherwise you could always get the XML RPC plugin. http://trac-hacks.org/wiki/XmlRpcPlugin and roll your own little tool.

For quickly creating similar tickets, you could use the Clone plugin: http://trac-hacks.org/wiki/CloneTicketPlugin

Edit And I second Espen's idea with the SVN checkin hook, it works great for us, as well.

Tephrite answered 22/9, 2008 at 11:21 Comment(1)
I use and like Mylyn, but how does it solve this problem? Creating a new task is a pain: New > Task with the mouse, select the repo in the dialog box, that gives you a new window where you have to edit details, then submit. Am I missing a fast way to add tasks?Finalize
W
5

You could try using EmailtoTrack, so you can create tickets just by sending emails.

(Another neat track tip, if not directly related to your question, is to use a commit hook with your version control system so you can close tickets by doing commits. I've only tried this one for SVN, but it shouldn't be hard to port.)

Wiseacre answered 22/9, 2008 at 11:26 Comment(0)
R
3

There is also a command-line trac ticket creator on track-hacks, you have to run it on the same machine as the trac repo resides. I find the command line addition to be much faster than the web-based one.

http://trac-hacks.org/wiki/TicketToTracScript

Reeves answered 26/4, 2012 at 11:7 Comment(0)
T
1

Meanwhile one programmed TicketImportPlugin which creates or updates multiple tickets in one user interaction from Excel table.

Teenager answered 4/6, 2013 at 7:33 Comment(0)
W
0

If Mylyn is working for you, consider checking out http://tasktop.com too. Tasktop extends Mylyn with powerful productivity features such as automatic time tracking, web browsing support, email and calendar integration, and more.

Wingless answered 8/12, 2008 at 1:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.