Edgewall Software
Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13008 closed defect (fixed)

Add standard ticket field names to TicketSystem.reserved_field_names

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.0.17
Component: ticket system Version:
Severity: minor Keywords:
Cc: Branch:
Release Notes:

Add standard ticket field names to TicketSystem.reserved_field_names.

API Changes:
Internal Changes:

Description

th:CustomFieldAdminPlugin validates the custom field using TicketSystem.reserved_field_names but time field is not listed in the variable. As the result, the plugin wrongly allow adding such a custom field.

I'd like to add the field names to the variable to avoid it.

  • trac/ticket/api.py

    diff --git a/trac/ticket/api.py b/trac/ticket/api.py
    index 33396c5c0..3bcd985e5 100644
    a b class TicketSystem(Component):  
    364364
    365365    reserved_field_names = ['report', 'order', 'desc', 'group', 'groupdesc',
    366366                            'col', 'row', 'format', 'max', 'page', 'verbose',
    367                             'comment', 'or', 'id']
     367                            'comment', 'or', 'id', 'time', 'changetime',
     368                            'owner', 'reporter', 'cc', 'summary',
     369                            'description', 'keywords']
    368370
    369371    def get_custom_fields(self):
    370372        return copy.deepcopy(self.custom_fields)

Related to #12958.

Attachments (0)

Change History (3)

comment:1 by Ryan J Ollos, 6 years ago

Change looks good to me.

comment:2 by Jun Omae, 6 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

Thanks. Committed in [16518] and merged in [16519-16520].

comment:3 by Jun Omae, 6 years ago

Owner: set to Jun Omae

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae 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.