Modify ↓
Opened 16 years ago
Closed 16 years ago
#3476 closed enhancement (wontfix)
Create new ticket with known ID
Reported by: | Cameron Junge | Owned by: | Alec Thomas |
---|---|---|---|
Priority: | normal | Component: | XmlRpcPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
As part of my desire to integrate Trac with a CRM, I'd like the ability to specify the ID of the ticket that is created.
I think a simple update to ticket.create to add an optional parameter would work. Keeps backwards compatibility as well.
Currently:
def create(self, req, summary, description, attributes = {}, notify=False): """ Create a new ticket, returning the ticket ID. """ t = model.Ticket(self.env) ...
could be changed to:
def create(self, req, summary, description, attributes = {}, notify=False, tkt_id=None): """ Create a new ticket, returning the ticket ID. """ t = model.Ticket(self.env, tkt_id) # tkt_id is allowed in trac.ticket.model ...
or something similar. A nicer way might be to have it as an attribute or something.
Thanks, Cameron.
Attachments (0)
Note: See
TracTickets for help on using
tickets.
model.Ticket(env, tkt_id)
is used to fetch an existing ticket. There is no way to create a ticket with a specific ID.