Custom Query (330 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (31 - 33 of 330)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Ticket Resolution Summary Owner Reporter
#35 fixed In trac 0.11 email2trac fails in notify and in ticket_update methods bas andrei2102@…
Description

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/email2trac.py", line 1062, in ?
    tktparser.parse(file('/tmp/tests/tm.eml', 'r'))
  File "/home/andrei/workspace/etf/trunk/share/bin/email2trac.py", line 663, in parse
    if self.ticket_update(m):
  File "/home/andrei/workspace/etf/trunk/share/bin/email2trac.py", line 542, in ticket_update
    tkt.save_changes(self.author, body_text, when)
  File "/home/andrei/workspace/etf/trunk/vendor/trac-0.11dev/trac/ticket/model.py", line 207, in save_changes
    when_ts = to_timestamp(when)
  File "/home/andrei/workspace/etf/trunk/vendor/trac-0.11dev/trac/util/datefmt.py", 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 datetime.now() is assumed. So the solution is to send a None.

A patch is attached.

#36 fixed read the configuration file with trac Configuration class bas andrei2102@…
Description

I'm implementing email2trac for a trac installation and I integrated the configuration file of the email2trac with the one of the trac it self. Using the trac configuration reader makes more sense to me and it can be united with all other configurations.

The ticket has a diff attached with the modifications. It works for trac 0.11. I didn't tested for older versions.

#37 fixed greedy matching in Subject line bas dmaziuk@…
Description

Current TICKET_RE greedy-matching (the default), so Subject like

#1?resolution=worksforme: Re: ia ia ia cthulhu f'tagn

will fail to update the ticket properly (ticketnr_fields will match to the colon after Re instead of the one after worksforme).

The fix is to use non-greedy qualifier: .*?: instead of .*:

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