Coding

How to create a new ticket in Trac from a script

Veröffentlicht in Kategorie Coding, Python am 26. Februar 2010 von Chris – Ersten Kommentar schreiben

This is just a note to myself and to spare someone, who faces the same task, going through the Trac sources to find out how to do this:

from trac.env import open_environment
from trac.ticket.model import Ticket

# A list of email addresses or trac user names
NOTIFICATION_LIST = ['randomhacker', 'boss']

ticket = Ticket(open_environment('/path/to/trac/env'))
ticket.populate(dict(
    component = u'My component',
    type = u'task',
    status = u'new',
    summary = u'Make the world a better place',
    reporter = u'me',
    # Set owner to default for given component
    owner = None,
    # You can use Trac wiki syntax here
    description = u"Don't ask '''me''' how to do it...",
    cc = ",".join(NOTIFICATION_LIST))
)
ticket_id = ticket.insert()

That’s all!

Update 2010-03-01: Naturally, after I figured this all out by myself by looking through the Trac source, I found this similar explanation on the trac wiki.

TurboGears 1.1 final(ly) released into the wild!

Veröffentlicht in Kategorie Coding, Python, TurboGears am 5. Oktober 2009 von Chris – 1 Kommentar

(A note to German readers: Artikel über Open Source, Programmieren und Software im Allgemeinen werde ich auf Englisch schreiben, da dies in meinem Kopf irgendwie so verdrahtet ist. Darüber kann ich gar nicht auf Deutsch schreiben ;) )

After releasing the 1.1rc1 release candidate two weeks ago, which seemed to have no major issues, and fixing a few remaining stumbling blocks, I am now proud and relieved to say, that TurboGears 1.1 final is finally out the door!

Weiter lesen »