Edgewall Software
Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#10034 closed defect (worksforme)

When creating a ticket via the XML-RPC plugin, e-mail notifications to the ticket owner are discarded

Reported by: sven.houthoofd@… Owned by:
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords:
Cc: Thijs Triemstra Branch:
Release Notes:
API Changes:

Description

In our company we created a customer support system which uses the XML-RPC plugin for trac. Normally, when tickets are created in trac, the owner is automatically assigned depending on the repository and recieves an email notification. But when customers create a ticket on the support site in a certain repository (even though the ticket owner is assigned), he doesn't receive an email notification…

Attachments (0)

Change History (5)

comment:1 by Remy Blank, 9 years ago

I'm not completely sure if this is a bug in Trac or in the th:XmlRpcPlugin. Simon?

comment:2 by Thijs Triemstra, 9 years ago

Cc: Thijs Triemstra added

comment:3 by jachim.coudenys@…, 9 years ago

The (altered) debug log of both requests:

WEB REQUEST

2011-02-18 09:57:29,330 Trac[main] DEBUG: Dispatching <Request "POST '/newticket'">
2011-02-18 09:57:29,333 Trac[api] INFO: Synchronized '' repository in 0.00 seconds
2011-02-18 09:57:29,334 Trac[session] DEBUG: Retrieving session for ID '_user_'
2011-02-18 09:57:29,376 Trac[notification] INFO: Sending notification through SMTP at 192.168.10.61:25 to [u'_email_', u'_email_']
2011-02-18 09:57:29,626 Trac[main] DEBUG: Dispatching <Request "GET '/ticket/13'">

API REQUEST

2011-02-18 10:03:50,012 Trac[main] DEBUG: Dispatching <Request "POST '/rpc'">
2011-02-18 10:03:50,016 Trac[api] INFO: Synchronized '' repository in 0.00 seconds
2011-02-18 10:03:50,016 Trac[web_ui] DEBUG: RPC incoming request of content type 'text/xml; charset=utf-8' dispatched to <tracrpc.xml_rpc.XmlRpcProtocol object at 0x2b1e7eb97810>
2011-02-18 10:03:50,016 Trac[web_ui] DEBUG: RPC(XML-RPC) call by '_user_'
2011-02-18 10:03:50,017 Trac[xml_rpc] DEBUG: RPC(xml) call by '_user_', method 'system.methodSignature' with args: ('ticket.create',)
2011-02-18 10:03:50,017 Trac[session] DEBUG: Retrieving session for ID '_user_'
2011-02-18 10:03:50,020 Trac[web_ui] DEBUG: RPC(XML-RPC) call by '_user_' system.methodSignature
2011-02-18 10:03:50,021 Trac[xml_rpc] DEBUG: RPC(xml) 'system.methodSignature' result: ['int,string,string', 'int,string,string,struct', 'int,string,string,struct,boolean']
2011-02-18 10:03:50,039 Trac[main] DEBUG: Dispatching <Request "POST '/rpc'">
2011-02-18 10:03:50,043 Trac[api] INFO: Synchronized '' repository in 0.00 seconds
2011-02-18 10:03:50,043 Trac[web_ui] DEBUG: RPC incoming request of content type 'text/xml; charset=utf-8' dispatched to <tracrpc.xml_rpc.XmlRpcProtocol object at 0x2b1e7ed9c810>
2011-02-18 10:03:50,044 Trac[web_ui] DEBUG: RPC(XML-RPC) call by '_user_'
2011-02-18 10:03:50,044 Trac[xml_rpc] DEBUG: RPC(xml) call by '_user_', method 'ticket.create' with args: ('_summary_', '_desc_', {'type': 'task'})
2011-02-18 10:03:50,045 Trac[session] DEBUG: Retrieving session for ID '_user_'
2011-02-18 10:03:50,048 Trac[web_ui] DEBUG: RPC(XML-RPC) call by '_user_' ticket.create
2011-02-18 10:03:50,058 Trac[xml_rpc] DEBUG: RPC(xml) 'ticket.create' result: 14

comment:4 by Remy Blank, 9 years ago

Resolution: worksforme
Status: newclosed

From the log, it seems that the th:XmlRpcPlugin doesn't even try to send the notification, so my guess is that it's by design. Looking at the source of the create() method, it looks like you can pass an optional argument notify that defaults to False, and that specifies if notifications should be sent or not. Try passing True in that argument. The same applies to the update() method.

So, PluginIssue and worksforme.

comment:5 by osimons, 9 years ago

Correct, Remy. I added notifications (and listeners), but kept it default 'off' to not make that a breaking change but rather an optional feature that developers can add as according to what suits their needs.

Anyway, I'm not always quick to parse through all ticket changes (as you well know)… If there are tickets that are relevant to what I've done or what may interest me, by all means just add me to CC: for the ticket to notify me directly. If I am interested in tickets I always use CC anyway, and if not I'll just remove myself.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from (none) to the specified user.

Add Comment


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