Edgewall Software
Modify

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 Jun Omae, 10 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, 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.

Last edited 10 years ago by Ryan J Ollos (previous) (diff)

comment:3 by Ryan J Ollos, 8 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 years ago

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

comment:5 by Ryan J Ollos, 14 months ago

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

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.