Custom Query (332 matches)


Show under each result:

Results (37 - 39 of 332)

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Ticket Resolution Summary Owner Reporter
#33 duplicate Using long name for post bas anonymous

I have tom@… and scott@… that are involved with a ticket. When "Scott Serr <scott@…>" uses email2trac to reply to this ticket, it shows in Trac as being changed by "Scott Serr" and not "scott" which is his short name (user name) in trac. This is not bad, but now the email notifications are not going to just tom and scott, they also go to "Serr@…" also... which doesn't exist.

I'm looking at get_author_emailaddrs() at about line 334-353 in the latest release of email2trac.

        # Look for email address in registered trac users
        users = [ u for (u, n, e) in self.env.get_known_users(self.db)
                         if e == self.email_addr ]

        if len(users) == 1:
             self.email_from = users[0]
             self.email_from =  self.email_to_unicode(message['from'])
             #self.email_from =  self.email_to_unicode(self.email_addr)

Yes, "scott" has filled out his Trac settings name "Scott Serr" and email "scott@…". I'm not a Python programmer, but it seems the users variable is not filled with the right stuff. Help?

#34 fixed Have newer seen such a good work before! bas anonymous

Source of this problem is in TicketEmailParser::notify().

Here it tries to set hrefs:

self.env.abs_href = Href(self.get_config('project', 'url'))
self.env.href = Href(self.get_config('project', 'url'))

Unfortunately as of Trac version 0.11 abs_href and href are properties that don't have function for setting value (see

href = property(_get_href, 'The application root path')
abs_href = property(_get_abs_href, 'The application URL')

So when trying to set hrefs you get str object is not callable exception. As a workaround I added set functions to above properties. See attached diff.

#35 fixed In trac 0.11 email2trac fails in notify and in ticket_update methods bas andrei2102@…

I started to port this script for trac 0.11 and I founded two errors.

The first is in the notify method and it is described in the #34 ticket. The solution, for me, was to remove the hack.

# create false {abs_}href properties, to trick Notify()
self.env.abs_href = Href(self.get_config('project', 'url'))
self.env.href = Href(self.get_config('project', 'url'))

The env members(abs_href and href) don't need to be overwritten.

The second problem was that in ticket_modify method. When saving the modifications made on a ticket it was passed an integer as the modification time.

Traceback (most recent call last):
  File "/home/andrei/workspace/etf/trunk/share/bin/", line 1062, in ?
    tktparser.parse(file('/tmp/tests/tm.eml', 'r'))
  File "/home/andrei/workspace/etf/trunk/share/bin/", line 663, in parse
    if self.ticket_update(m):
  File "/home/andrei/workspace/etf/trunk/share/bin/", line 542, in ticket_update
    tkt.save_changes(, body_text, when)
  File "/home/andrei/workspace/etf/trunk/vendor/trac-0.11dev/trac/ticket/", line 207, in save_changes
    when_ts = to_timestamp(when)
  File "/home/andrei/workspace/etf/trunk/vendor/trac-0.11dev/trac/util/", line 55, in to_timestamp
    diff = dt - _epoc
TypeError: unsupported operand type(s) for -: 'int' and 'datetime.datetime'

In trac 0.11 if the modification time is None then is assumed. So the solution is to send a None.

A patch is attached.

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Note: See TracQuery for help on using queries.