Modify

Opened 9 years ago

Closed 9 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)

Change History (1)

comment:1 Changed 9 years ago by Alec Thomas

Resolution: wontfix
Status: newclosed

model.Ticket(env, tkt_id) is used to fetch an existing ticket. There is no way to create a ticket with a specific ID.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Alec Thomas.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.