Opened 10 years ago
Last modified 14 months ago
#11714 new enhancement
Log unknown attributes in ticket workflow
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-stable-1.6.x |
Component: | ticket system | Version: | |
Severity: | normal | Keywords: | workflow |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
It would be useful to either log a warning or raise a ConfigurationError
when an attribute in the [ticket-workflow]
section is unknown. For example:
[ticket-workflow] resolve.permission = TICKET_MODIFY
where permission
is used rather than permissions
, should result in a warning such as:
10:20:50 AM Trac[default_workflow] WARNING: Unknown attribute 'permission' in [ticket-workflow] section of trac.ini: resolve.permission = TICKET_MODIFY
More extensive changes are planned, but a starting point is log:rjollos.git:t11714.
Attachments (0)
Change History (5)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
The more extensive changes I alluded to should include some sort of method for the Component to declare what the valid attributes are. I'm not sure yet how this might be implemented, but maybe something as simple as a list of attributes
on the class.
Given the usage in th:TypedTicketWorkflowPlugin, whatever change happens here might be more appropriate for a major release.
comment:3 by , 8 years ago
Milestone: | next-stable-1.0.x → next-stable-1.2.x |
---|
Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.
comment:4 by , 5 years ago
Milestone: | next-stable-1.2.x → next-stable-1.4.x |
---|
Sounds good. However, th:TypedTicketWorkflowPlugin uses
ConfigurableTicketWorkflow
as base class at th:source:typedticketworkflowplugin/trunk/typedworkflow/controller.py@13574:12 and.tickettype
attribute in the workflow. The changes wrongly would log a warning for the attribute.