Modify

Opened 6 years ago

Closed 6 years ago

#3476 closed enhancement (wontfix)

Create new ticket with known ID

Reported by: cjunge@… Owned by: athomas
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 6 years ago by athomas

  • Resolution set to wontfix
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Action
as closed The owner will remain athomas.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.