Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#2067 closed defect (duplicate)

Cannot change ticket type via WebAdmin plugin

Reported by: Shunichi Goto <gotoh@…> Owned by: Jonas Borgström
Priority: normal Milestone:
Component: ticket system Version: devel
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I found that I cannot rename ticket type value via WebAdmin plugin. The operation causes exception. This problem comes from difference between enum name in enum table and column name in ticket table. So I modified trac.ticket.AbstractEnum and trac.ticket.Type` like this:

  • model.py

     
    272272
    273273class AbstractEnum(object):
    274274    type = None
     275    ticket_column = None
    275276
    276277    def __init__(self, env, name=None, db=None):
     278        if not self.ticket_column:
     279            self.ticket_column = self.type
    277280        self.env = env
    278281        if name:
    279282            if not db:
     
    348351        if self.name != self._old_name:
    349352            # Update tickets
    350353            cursor.execute("UPDATE ticket SET %s=%%s WHERE %s=%%s" %
    351                            (self.type, self.type), (self.name, self._old_name))
     354                           (self.ticket_column, self.ticket_column),
     355                           (self.name, self._old_name))
    352356            self._old_name = self.name
    353357            self._old_value = self.value
    354358
     
    371375
    372376class Type(AbstractEnum):
    373377    type = 'ticket_type'
     378    ticket_column = 'type'
    374379
    375380
    376381class Status(AbstractEnum):

Attachments (0)

Change History (3)

comment:1 by Shunichi Goto <gotoh@…>, 19 years ago

Milestone: 0.9
Resolution: fixed
Status: newclosed

It seems that this patch was applied in r2344.
(related ticket: #2203)

comment:2 by Matthew Good, 19 years ago

Milestone: 0.9
Resolution: fixed
Status: closedreopened

Well, the tickets are actually duplicates, so only one should be "fixed".

comment:3 by Matthew Good, 19 years ago

Resolution: duplicate
Status: reopenedclosed

This is a duplicate of #2203.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.