Ticket Reminder e-mails

58 views
Skip to first unread message

Dan

unread,
Mar 11, 2022, 11:44:31 AM3/11/22
to Trac Users
I've been looking for a way to give reminders for tickets, and I think TicketReminder plugin does basically what I need.  I am currently using Trac 1.4.2.  However, that plugin is mostly out of date.  (If there is another one that is more maintained, please let me know.)

I ended up getting the plugin mostly updated (substituting outdated APIs, porting to Jinja2, and incorporating notification preferences), but I am currently having it send e-mails via a TicketChangeEvent sent to NotificationSystem.  However, I can't figure out a way to modify the subject line to add "Ticket Reminder" or something like that.

Is the proper way to deal with this problem to subclass TicketChangeEvent and TicketFormatter?  I haven't tried it yet, but seems like that might work.  Unfortunately TicketFormatter has the "realm" hard-coded to 'ticket', so it seems I can't really re-use some of the functions that I'd like to; I'd have to re-implement them.

I'd appreciate any words of wisdom.

- Dan

Dan

unread,
Mar 14, 2022, 3:43:15 PM3/14/22
to Trac Users
FWIW, I ended up just pasting in the related code from Trac and TracHtmlNotificationPlugin.  Works OK as far as I can tell after limited testing, but I should clean up the code a bit.

It seems like the author has basically left this plugin unchanged for about four years (the source is on gitHub), so I'm assuming he wouldn't be interested in looking over the changes.  In the past, I have worked with Ryan on plugin mods, though via tickets.  (Thanks very much, by the way, for all the help over the years.)  I'm not sure how/where would be the best way to get the updated plugin into the Trac ecosytem.

I'm kind of looking forward to (and also dreading) the port to Python 3 for all the plugins I've been using lol.

Thanks!

- Dan

Jun Omae

unread,
Mar 14, 2022, 7:12:05 PM3/14/22
to trac-...@googlegroups.com
On Tue, Mar 15, 2022 at 4:43 AM Dan <dan....@digidescorp.com> wrote:
> It seems like the author has basically left this plugin unchanged for about four years (the source is on gitHub), so I'm assuming he wouldn't be interested in looking over the changes.

The latest of plugin source is on trac-hacks.org:

https://trac-hacks.org/wiki/TracHtmlNotificationPlugin
https://trac-hacks.org/svn/trachtmlnotificationplugin
https://trac-hacks.org/browser/trachtmlnotificationplugin

Also, I made the repository on github.com private.

--
Jun Omae <jun...@gmail.com> (大前 潤)

Dan

unread,
Mar 15, 2022, 10:37:07 AM3/15/22
to Trac Users
On Monday, March 14, 2022 at 6:12:05 PM UTC-5 Jun Omae wrote:
https://trac-hacks.org/wiki/TracHtmlNotificationPlugin
 
Thanks, Jun.  But the plugin I'm actually working on is the TicketReminderPlugin


I did take some code from TracHtmlNotificationPlugin and grafted it into the reminder plugin so it could send HTML reminder e-mails, though.

The source code and issues for TicketReminderPlugin are on GitHub


At this point I'm wondering how to contribute my modifications to TicketReminderPlugin.  For other plugins I've worked on, I just posted patches on trac-hacks via tickets there; however, this plugin is mostly managed on GitHub.  It looks like there are a few forks as well, which I did not investigate at first.  I suppose I could post the patches or new source code on GitHub somehow.  Although I'm somewhat familiar with GitHub, I have never really used it much.

Thanks again.

- Dan 

RjOllos

unread,
Mar 15, 2022, 12:23:46 PM3/15/22
to Trac Users
On Tuesday, March 15, 2022 at 7:37:07 AM UTC-7 Dan wrote:
At this point I'm wondering how to contribute my modifications to TicketReminderPlugin.  For other plugins I've worked on, I just posted patches on trac-hacks via tickets there; however, this plugin is mostly managed on GitHub.  It looks like there are a few forks as well, which I did not investigate at first.  I suppose I could post the patches or new source code on GitHub somehow.  Although I'm somewhat familiar with GitHub, I have never really used it much.

On GitHub, the workflow is to fork the repository, put your changes on a branch, and then create a pull request against the source repository. 

Dan

unread,
Mar 15, 2022, 3:26:55 PM3/15/22
to Trac Users
On Tuesday, March 15, 2022 at 11:23:46 AM UTC-5 RjOllos wrote:
On GitHub, the workflow is to fork the repository, put your changes on a branch, and then create a pull request against the source repository. 

Thanks.  I did it.

- Dan

Dan

unread,
Mar 18, 2022, 11:52:59 AM3/18/22
to Trac Users
I ended up testing TicketReminderPlugin with Trac 1.5.4 and made some adjustments for that as well.  My standard test installation is 1.4.2.  I"m using Ubuntu LTS under WSL.

While I've been using Python 3 since before it came out, I really only use it for test scripts (and now updating Trac plugins).  So, some of my mods might be improved.  Let me know if you have any comments.

Thanks again.

- Dan

Dan

unread,
Apr 5, 2022, 10:53:57 AM4/5/22
to Trac Users

I've started to put this into production on our Trac 1.4.2 server, FWIW.
Reply all
Reply to author
Forward
0 new messages