Edgewall Software

Opened 6 years ago

Last modified 6 years ago

#13008 closed defect

Add standard ticket field names to TicketSystem.reserved_field_names — at Initial Version

Reported by: Jun Omae Owned by:
Priority: normal Milestone: 1.0.17
Component: ticket system Version:
Severity: minor Keywords:
Cc: Branch:
Release Notes:
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.

Change History (0)

Note: See TracTickets for help on using tickets.