Hi all,

I did some searching on creating tickets by code. and saw 3 types of
answers: use xmlrpc, use emal2trac, and "it's easy, just implement a
ITicketManiupulator using the api.

This third method is what I am after, those response also basically
said do a pydoc on the trac.ticket.api, said it was "easy" and stopped
there.

well, I did, I get it, if i want to just create a ticket, and insert
into the database.

what I don't get is how to do the following, mostly because when I
look at the model.py for the ticket objects and others, there are no
comments, or are very sparse ones.

I want to:
when someone creates a new ticket, based on some custom fields, do
some custom action(s).  That was the generalized plug-in speak.

specifically what I want to do is, look at 1 of several checkbox
fields, if they are checked:
 - create another, "sub ticket", I might use the MasterTicketPlugin,
might not, I may just have a custom field called "Master"  as it is
really for reporting, not so much "blocking"
- fill in the title based on the original ticket title plus a small
annotation
- fill in the description as a copy of the orginal's description,
again with a small annotation
- fill in sever other fields to match the orignal, some of which are
custom (potentially)
- change the component
- optionally unset the owner.

What I don't see is how to get/set the custom fields on the "ticket"
object.

For example:
customTicketFomat:
Title: fix the bug
Description: squash the roach
all the standard fields
a custom field: component, set to "core"
custom fields:
Req Change required? YES
Design Doc change? NO
Validation plan updates? YES
User Manual Update required? YES
...
create ticket:

actions:
if Req Change required:
   create a ticket and add :
      ReQDoc update to title and description,
      put link to ticket # (master) in description
      set category to "Requirements"
if Design Design Doc change:
   create new ticket to update design doc,  similar to above...
etc...

I am sure it can be done, and I "think" I have just enough information
to be dangerous, I am concered about if between intercepting the "new
ticket" action, and the actual insertion to database, I might lose the
correct ticket number, how to get the custom field values, and also
how to set those.

Any pointers?

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