Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10519 closed defect (fixed)

Changes not reported in mail notifications

Reported by: dunkel@… Owned by: Björn Harrtell
Priority: normal Component: GridModifyPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description (last modified by Ryan J Ollos)

It seems the way the GridModifyPlugin updates the ticket means that certain parts of the notification flow is bypassed. I don't know the Trac source very well, but I tried to trace through the code and came across this:

Line 180 in trac/ticket/notification.py looks like this:

        for change in TicketModule(self.env).grouped_changelog_entries(ticket, when=modtime):

The call to grouped_changelog_entries() returnes an empty list when using gridmod, but NOT when using the Trac UI. The result is that the notification flow is not updated correctly. In the ticket_notify_email.txt the $changes_body won't be set correctly, which means that the email notification doesn't show WHAT was changed using gridmod.

Don't know if this is related to the 1.0 release.

Attachments (0)

Change History (6)

comment:1 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

(In [12234]) Fixes #10519: Ticket property changes were not being included in the email body.

comment:3 Changed 12 years ago by Ryan J Ollos

Thanks for the report. I think you were on the right track with debugging. The modification time is used as the index to get the change entries in notification.py. However, the when parameter, which sets the modification time, was not being passed to Ticket.save_changes, so it defaults to using the current time to set the column. The end effect was that were were attempting to retrieve changes with a different modification time than those we just saved.

comment:4 Changed 12 years ago by dunkel@…

Awesome. It seems to work now. Thanks for the superfast turnaround :) You also got rid of the "modified by gridmod" comment which is good ;-)

comment:5 Changed 12 years ago by Ryan J Ollos

(In [12235]) Refs #10519:

  • Added changelog entry for #10519/[12234]
  • Minor code refactoring and reorganization.

comment:6 in reply to:  4 Changed 12 years ago by Ryan J Ollos

Replying to dunkel@dunkel.dk:

Awesome. It seems to work now. Thanks for the superfast turnaround :) You also got rid of the "modified by gridmod" comment which is good ;-)

Thanks for reporting back! Don't hesitate to open another ticket if you discover any more issues.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Björn Harrtell.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.