Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#10702 closed defect (fixed)

Support for trac 0.11

Reported by: ejucovy Owned by: ejucovy
Priority: normal Component: WorkflowNotificationPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


When active in a Trac 0.11.7 environment, the plugin causes an error in the browser when submitting a new ticket or editing an existing ticket. The error only occurs if one or more notifications would be triggered by the current submission.

The error is:

Python Traceback

Most recent call last:
File "/private/tmp/foos/lib/python2.7/site-packages/trac/web/", line 450, in _dispatch_request
File "/private/tmp/foos/lib/python2.7/site-packages/trac/web/", line 206, in dispatch
File "/private/tmp/foos/lib/python2.7/site-packages/trac/ticket/", line 183, in process_request
File "/private/tmp/foos/lib/python2.7/site-packages/trac/ticket/", line 399, in _process_newticket_request
File "/private/tmp/foos/lib/python2.7/site-packages/trac/ticket/", line 1000, in _do_create
File "/private/tmp/foos/lib/python2.7/site-packages/trac/ticket/", line 214, in insert
File "/private/tmp/trac-WorkflowNotificationPlugin/workflow_notification/", line 136, in ticket_created
File "/private/tmp/trac-WorkflowNotificationPlugin/workflow_notification/", line 121, in apply_action_side_effects
File "/private/tmp/trac-WorkflowNotificationPlugin/workflow_notification/", line 79, in notify

TypeError: notify() takes exactly 3 arguments (4 given)

Attachments (0)

Change History (2)

comment:1 Changed 20 months ago by ejucovy

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in 46576fe0 and tagged & released as 0.4

Trac's function trac.notification:NotifyEmail.notify changed its signature between 0.12 and 1.0; in 0.12 and earlier versions, it only took two arguments. The plugin now inspects that function's signature to figure out how many arguments to send it.

That's not a public API method in Trac -- the plugin just uses it because it's a reasonably convenient way to send out an email that respects ALWAYS_CC and ALWAYS_BCC and the other general purpose notification settings, but it's a bad hack. At some point it should be replaced with a more stable way to send an email.

comment:2 Changed 20 months ago by rjollos

I don't think it's effectively any different than what you did, but Trac actually has a util function even back in 0.11 for checking the number of arguments:.

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from ejucovy. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.