* On 28 Jul 2009, David Champion wrote: 
> 
> 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'

You probably should set tkt['summary'] here also, or bad things might
happen.

>               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
-~----------~----~----~----~------~----~------~--~---

Reply via email to