Edgewall Software

Opened 6 years ago

Last modified 5 months ago

#11714 new enhancement

Log unknown attributes in ticket workflow

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: next-stable-1.4.x
Component: ticket system Version:
Severity: normal Keywords: workflow
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


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:

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 (4)

comment:1 by Jun Omae, 6 years ago

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.

comment:2 by Ryan J Ollos, 6 years ago

The more extensive changes I eluded 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.

Version 0, edited 6 years ago by Ryan J Ollos (next)

comment:3 by Ryan J Ollos, 4 years ago

Milestone: next-stable-1.0.xnext-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 Ryan J Ollos, 5 months ago

Milestone: next-stable-1.2.xnext-stable-1.4.x

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.