Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#2486 closed defect (fixed)

Error while sending ticket notification

Reported by: pjenvey@… Owned by: Jonas Borgström
Priority: high Milestone: 0.9.2
Component: ticket system Version: 0.9.1
Severity: normal Keywords: notification email
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

22:57:14 Trac[web_ui] ERROR: Failure sending notification on change to ticket #69: 'link'
Traceback (most recent call last):
  File "/usr/local/lib/python2.3/site-packages/trac/ticket/web_ui.py", line 354, in _do_save
    tn.notify(ticket, newticket=False, modtime=now)
  File "/usr/local/lib/python2.3/site-packages/trac/Notify.py", line 212, in notify
    NotifyEmail.notify(self, ticket.id, subject)
  File "/usr/local/lib/python2.3/site-packages/trac/Notify.py", line 109, in notify
    Notify.notify(self, resid)
  File "/usr/local/lib/python2.3/site-packages/trac/Notify.py", line 47, in notify
    self.send(to)
  File "/usr/local/lib/python2.3/site-packages/trac/Notify.py", line 329, in send
    hdrs['X-Trac-Ticket-URL'] = self.ticket['link']
  File "/usr/local/lib/python2.3/site-packages/trac/ticket/model.py", line 94, in __getitem__
    return self.values[name]
KeyError: 'link'

I have the following notification section in trac.ini:

[notification]
smtp_replyto = donotreply@hellanzb.com
smtp_always_cc = pjenvey@groovie.org
smtp_server = localhost
smtp_enabled = true
smtp_from = donotreply@hellanzb.com
always_notify_reporter = true
always_notify_owner = true

Attachments (0)

Change History (4)

comment:1 by pjenvey@…, 18 years ago

This is on 1.0dev r2595

comment:2 by anonymous, 18 years ago

I am facing the same issue with the 0.9.1 configure to be served by apache using trac.cgi.

I work around this issue by adding a try catch block the in model.py

    def __getitem__(self, name):
        try:
            return self.values[name]
        except KeyError:
            self.env.log.warning('Added by yml - Invalid key for values dic %s choose among %s' %(name,str(self.values.keys())))

then the mail is sent but without the url to the ticket The mail send is the one below: #8: test 7


Reporter: anonymous | Owner: me@…

Type: defect | Status: new

Priority: major | Milestone:

Component: test | Version:

Resolution: | Keywords:


Comment (by anonymous):

test 2

— Ticket URL: ≠ ⇐===This is were the pb is TracRepository2 <http://example.com/> My example project

I hope that will help

comment:3 by anonymous, 18 years ago

Version: devel0.9.1

Oups I forgot to specify the level

comment:4 by Christopher Lenz, 18 years ago

Milestone: 0.9.2
Priority: normalhigh
Resolution: fixed
Status: newclosed

This issue has already bin fixed in 0.9.2.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström 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.