Modify ↓
Opened 19 years ago
Closed 19 years ago
#2067 closed defect (duplicate)
Cannot change ticket type via WebAdmin plugin
Reported by: | 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
272 272 273 273 class AbstractEnum(object): 274 274 type = None 275 ticket_column = None 275 276 276 277 def __init__(self, env, name=None, db=None): 278 if not self.ticket_column: 279 self.ticket_column = self.type 277 280 self.env = env 278 281 if name: 279 282 if not db: … … 348 351 if self.name != self._old_name: 349 352 # Update tickets 350 353 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)) 352 356 self._old_name = self.name 353 357 self._old_value = self.value 354 358 … … 371 375 372 376 class Type(AbstractEnum): 373 377 type = 'ticket_type' 378 ticket_column = 'type' 374 379 375 380 376 381 class Status(AbstractEnum):
Attachments (0)
Change History (3)
comment:1 by , 19 years ago
Milestone: | → 0.9 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 19 years ago
Milestone: | 0.9 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Well, the tickets are actually duplicates, so only one should be "fixed".
comment:3 by , 19 years ago
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
This is a duplicate of #2203.
Note:
See TracTickets
for help on using tickets.
It seems that this patch was applied in r2344.
(related ticket: #2203)