Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#223 closed defect (fixed)

Incorrectly sets the number of comments

Reported by: stas.agarkov@… Owned by: bas
Priority: major Milestone:
Component: email2trac Version: 1.6.0
Keywords: Cc:

Description

email2trac incorrectly sets the number of comments, because it is based on a number of changes to the table ticket_change. trac uses the TicketModule?.grouped_changelog_entries, which returns a list of changes, in which simultaneous changes are grouped into one that is as it appears in the trac. Your code:

## How many changes has this ticket
#
cnum = len(tkt.get_changelog())

Right code:

# How many changes has this ticket
from trac.ticket.web_ui import TicketModule
grouped = TicketModule(self.env).grouped_changelog_entries(tkt, self.db)
cnum = sum(1 for e in grouped) + 1

Attachments (0)

Change History (2)

comment:1 Changed 14 years ago by bas

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

(In [486]) Fixed the calculation of number of ticket changes, closes #223

comment:2 Changed 14 years ago by bas

Thanks for the patch

Add Comment

Modify Ticket

Change Properties
Action
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.