Modify

Opened 22 months ago

Closed 22 months ago

Last modified 22 months ago

#10519 closed defect (fixed)

Changes not reported in mail notifications

Reported by: dunkel@… Owned by: bjornharrtell
Priority: normal Component: GridModifyPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description (last modified by rjollos)

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 22 months ago by rjollos

  • Description modified (diff)

comment:2 Changed 22 months ago by rjollos

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

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

comment:3 Changed 22 months ago by rjollos

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 follow-up: Changed 22 months 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 22 months ago by rjollos

(In [12235]) Refs #10519:

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

comment:6 in reply to: ↑ 4 Changed 22 months ago by rjollos

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.

Add Comment

Modify Ticket

Action
as closed .
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.