Changes between Version 10 and Version 11 of DailyReminderScriptForTracScript
- Timestamp:
- Jun 9, 2015, 9:30:27 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DailyReminderScriptForTracScript
v10 v11 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 2 3 = Daily email to remind owners of open tickets =3 = Daily email to remind owners of open tickets 4 4 5 == Description ==5 == Description 6 6 7 This is a script for sending daily reminder emails of tickets owned (like one's notice scripts, or todo scripts).7 This is a script for sending daily reminder emails of tickets owned, like one's notice scripts, or todo scripts. 8 8 9 9 The script searches the ticket status, and if one's status is not closed, it collects by owner and sends each of them a html mail. 10 10 11 This is a ptyhon script The underlying database connection relies on python's db capabilities, so probably you will have to install the appropriate db connector module(s) for your db. (MySQL: mysql-python, PostgreSQL: psycopg2, SQLite: sqlite2 or sqlite3) - and of course you'll need python 2.6 as well... 11 This is a Python script. The underlying database connection relies on Python's db capabilities, so probably you will have to install the appropriate db connector module(s) for your database: 12 * MySQL: mysql-python 13 * PostgreSQL: psycopg2 14 * SQLite: sqlite2 or sqlite3 15 And of course you'll need Python 2.6 as well. 12 16 13 17 It is tested on Trac 0.11 and 0.12 with PostgreSQL 3.10 and Python 2.6 on a Gentoo box. 14 (I didn't test it on other platforms, but it isn't used to be very hard to adopt this tiny script to suit your needs... - like me: I have copied [http://trac-hacks.org/wiki/TicketRemindScript TicketReminder] script, and just customized it ;) )15 16 I know it could be written more efficient, and a nicer code. For now it is enough :)17 18 18 19 Feel free to adopt it to your needs, please test it, use it! … … 20 21 '''UPDATE:''' 21 22 One should change line 103 if upgrading from Trac 11.x to Trac 12.x due to database changes: 22 {{{ 23 #!python 23 {{{#!python 24 24 detail = detail + " created at " + str(time.strftime('%Y. %B %d. (%A) %H:%M:%S',time.gmtime(int(tkt[0]/1000000)))) 25 25 }}} 26 Please take care of indentation! 27 (the 12.x database converts every timestamp to a more accurate timestamp format, so a timestamp field must be divided by a million to work properly) 26 27 Please take care of indentation! The Trac 12.x database converts every timestamp to a more accurate timestamp format, so a timestamp field must be divided by a million to work properly. 28 28 29 29 See also: TracReminderScript, TicketRemindScript 30 30 31 == Bugs/Feature Requests ==31 == Bugs/Feature Requests 32 32 33 33 Existing bugs and feature requests for DailyReminderScriptForTracScript are … … 35 35 36 36 If you have any issues, create a 37 [ http://trac-hacks.org/newticket?component=DailyReminderScriptForTracScript&owner=ethanolenew ticket].37 [/newticket?component=DailyReminderScriptForTracScript new ticket]. 38 38 39 == Download == 39 [[TicketQuery(component=DailyReminderScriptForTracScript&group=type,format=progress)]] 40 41 == Download 40 42 41 43 Download the zipped source from [download:dailyreminderscriptfortracscript here]. 42 44 43 == Source ==45 == Source 44 46 45 47 You can check out DailyReminderScriptForTracScript from [http://trac-hacks.org/svn/dailyreminderscriptfortracscript here] using Subversion, or [source:dailyreminderscriptfortracscript browse the source] with Trac. 46 48 47 == Example ==49 == Example 48 50 49 One should put in a cronjob, ie: 50 51 '''/etc/cron.d/trac_remind.cron''' 52 {{{ 53 #!sh 51 One should put in a cronjob '''/etc/cron.d/trac_remind.cron''': 52 {{{#!sh 54 53 0 0 * * mon-fri root /path/to/this/script/trac_reminder_report.py 55 54 }}} 56 (don't forget to put a MAILTO=your.address@your.domain.tld into the cron file, the script prints out the recipients names where the mails had been sent)57 55 58 == Recent Changes == 56 Don't forget to put a MAILTO=your.address@your.domain.tld into the cron file, the script prints out the recipients names where the mails had been sent. 57 58 == Recent Changes 59 59 60 60 [[ChangeLog(dailyreminderscriptfortracscript, 3)]] 61 61 62 == Author/Contributors ==62 == Author/Contributors 63 63 64 64 '''Author:''' [wiki:ethanole] [[BR]] 65 '''Maintainer:''' [ wiki:ethanole] [[BR]]65 '''Maintainer:''' [[Maintainer]] [[BR]] 66 66 '''Contributors:'''