* On 28 Jul 2009, David Starr wrote:
>
> Any Python hackers out there with some quick and dirty code to insert
> a bunch of 'dummy' tickets in to Trac?
import trac, trac.env, trac.ticket
env = trac.env('/path/to/environment')
ct = 0
try:
for i in xrange(1, 1000):
tkt = trac.ticket.Ticket(env)
tkt['description'] = 'dummy ticket %d' % i
tkt['status'] = 'new'
tkt['reporter'] = 'testbot'
tktno = tkt.insert()
print 'Inserted ticket #%d' % tktno
ct += 1
except:
print 'Inserted %d dummy tickets' % ct
--
-D. [email protected] NSIT University of Chicago
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---