Modify ↓
#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 |
||
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): 364 364 365 365 reserved_field_names = ['report', 'order', 'desc', 'group', 'groupdesc', 366 366 'col', 'row', 'format', 'max', 'page', 'verbose', 367 'comment', 'or', 'id'] 367 'comment', 'or', 'id', 'time', 'changetime', 368 'owner', 'reporter', 'cc', 'summary', 369 'description', 'keywords'] 368 370 369 371 def get_custom_fields(self): 370 372 return copy.deepcopy(self.custom_fields)
Related to #12958.
Attachments (0)
Change History (3)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Thanks. Committed in [16518] and merged in [16519-16520].
comment:3 by , 7 years ago
Owner: | set to |
---|
Note:
See TracTickets
for help on using tickets.
Change looks good to me.