4 | | == Description == |
5 | | |
6 | | The AnnouncerPlugin is meant to provide an extensible, user-customizable notification system that can be used to completely replace Trac's default notifications. |
7 | | |
8 | | At the very least, it will allow users to receive notices about attachments, and to opt-out from receiving messages due to the always_notify_(owner|reporter|updater) options. |
9 | | |
10 | | The full system (in the not-too-distant-future) will allow users to 'subscribe' to certain events by specifying simple yet powerful rules, such as asking to receive an announcement for any change that involves a ticket with a priority greater then 'high'. Later, a 'watch' feature is intended to replace CC usage, and allow watching of wiki-pages, and then to enable other plug-ins to provide new means for registering messages that users can subscribe to. |
11 | | |
12 | | The AnnouncerPlugin is meant to be agnostic to what is being watched; where you should send something (email, IRC, jabber, ...), and what format it should look at. All in good time. |
13 | | |
14 | | See also WikiNotificationPlugin. |
15 | | |
16 | | === Modules === |
17 | | |
18 | | The plugin itself is very modular, and exactly what features you have will depend on which modules you enable. You select modules in the 'Plugins' page of the 'Admin' section of your trac. |
19 | | |
20 | | ==== Legacy Modules ==== |
21 | | |
22 | | These mimic the standard trac notification that has been in Trac for awhile. In all cases, they are configured via the [announcer] section of the trac.ini. In most cases, the options are identical to what was previously in the [notification] section. In fact its recommended that you simply rename [notification] to [announcer] if you are going to be using any of these compatibility modules. |
23 | | |
24 | | * ''!StaticTicketSubscriber'': If enabled, this module will obey the ''smtp_always_bcc'' option to deliver a copy of every announcement sent out to a single address. |
25 | | |
26 | | * ''!LegacyTicketSubscriber'': If enabled, this module will obey the ''always_notify_owner'', ''always_notify_reporter'' and ''always_notify_updater'' option, except that individual users may choose to opt-out of this on a per-option basis. So if you don't want to receive messages just because you are the reporter, you can uncheck that. |
27 | | |
28 | | * ''!CarbonCopySubscriber'': If enabled, any name (or address) put into the CC field of a ticket will receive a notification. ''Note'': I recommend you turn this off and instead use the CC field for groups and the Watch This feature for CC's! See below. |
29 | | |
30 | | [[Image(TicketNotificationPreferences.png)]] |
31 | | |
32 | | ==== Groups ==== |
33 | | |
34 | | With the ''joinable_groups'' option in the [announcer] section, the Trac Admins can create any number of joinable groups. Any users may then in their preferences choose to join them by simply clicking to opt-into the membership. |
35 | | |
36 | | This feature is provided by ''!JoinableGroupSubscriber'', and is meant to create targeted groups of people that should be notified about certain important issues. One example might be 'security' that security-related bugs should notify everyone about. Another might be 'sitedown' that represents a critical failure at a customer's site where you want to be sure to notify certain high level management in your company. |
37 | | |
38 | | In any case, by prepending the group with an @ and adding it into the CC box, everyone who has opted into that group will receive notification of changes to that ticket. E.g., adding '@security' to the CC field will send the security team a message whenever someone alters it. The !CarbonCopySubscriber ignores any such entries (if its enabled at all) |
39 | | |
40 | | [[Image(AnnouncerPlugin:Groups-Prefs.jpg)]] |
41 | | |
42 | | |
43 | | ==== Watches ==== |
44 | | |
45 | | If ''!WatchSubscriber'' is enabled, then in the context-sensitive navigation portion of each ticket and wiki page, a 'Watch This' link will be provided. Clicking on it will add you to the watch list for the resource-- any changes to it will be sent to you. This can be in addition to the CC field if you have !CarbonCopySubscriber enabled, or you can use it to replace the functionality. When a page is already watched, the link changes to 'Unwatch This' |
46 | | |
47 | | [[Image(AnnouncerPlugin:WatchThis.png)]] |
48 | | |
49 | | ==== General Wiki ==== |
50 | | |
51 | | If you would like to receive more general notice of wiki changes, you can use the ''!GeneralWikiSubscriber''. With it you may specify any number of patterns, and if they match a wiki page name, you'll receive a notice if that page is created, edited, deleted, or such. |
52 | | |
53 | | In particular, you may use a pattern of '*' and you'll see any wiki changes that happen on the site. |
54 | | |
55 | | This is particularly useful in situations where the wiki uses a hierarchal structure; so if you use a pattern such as 'Project*', then 'Project/Plan' and 'Project/Concerns' will all match. |
56 | | |
57 | | [[Image(AnnouncerPlugin:GeneralWiki.png)]] |
58 | | |
59 | | ==== Formatters ==== |
60 | | |
61 | | For tickets, both a plain text and HTML formatter are currently supplied, and you may choose which you wish to receive in your preferences. For wiki pages, only a plain text notice is currently available. |
62 | | |
63 | | The HTML formatter also sends out a plain text alternative for those email clients that may not support HTML email. |
64 | | |
65 | | The following trac.ini options are available to configure the ticket formatter: |
66 | | |
67 | | ticket_email_subject:: |
68 | | Determines the subject of the email that is sent out. Defaults to ''Ticket #${ticket.id}: ${ticket!['summary']}''. |
69 | | ticket_email_header_fields:: |
70 | | A list of fields that are always sent at the top of the email notification; Defaults to ''owner, reporter, milestone, priority, severity''. |
71 | | |
72 | | [[Image(AnnouncerPlugin:HtmlEmail.jpg)]] |
73 | | |
74 | | |
75 | | ==== Distributors ==== |
76 | | |
77 | | Although the goal is to allow many kinds of distribution, at this point we're only delivering to email addresses. The ''!EmailDistributor'' uses the same options as the old trac notification, just (as above) in the ''announcer'' section and not the ''notification'' section. Some options it doesn't quite use yet but will in the future. |
78 | | |
79 | | There are a few additional ones: |
80 | | * use_threaded_delivery: If Python is built with threads, this option will speed up actual delivery by a second or two-- that's not a long time, but it's time not spent delaying a request from going through. |
81 | | * default_email_format: This should be either 'text/plain' or 'text/html' and represents the default format that it sends email as. Users may override this in their preferences. |
82 | | * email_address_resolvers: An ordered list of resolvers (see below) that the distributor uses to map usernames to email addresses. The first one that returns an address, wins. |
83 | | |
84 | | ==== Resolvers ==== |
85 | | |
86 | | Currently, the following resolvers can be configured to map usernames to email addresses: |
87 | | |
88 | | * ''!DefaultDomainResolver'': This will simply blindly append the domain specified in [announcer] smtp_default_domain onto the end of the username. |
89 | | * ''!SpecifiedEmailResolver'': This will allow the user to override the email address in Trac (or anywhere else) to demand all email be sent to a certain address specified in their user preferences (and separate from Trac's normal address) |
90 | | * ''!SessionEmailResolver'': This will retrieve the email address associated with the username's Trac session. |
91 | | |
92 | | The order is important: if you specify resolvers as |
93 | | |
94 | | {{{ |
95 | | [announcer] |
96 | | email_address_resolvers = DefaultDomainResolver, SpecifiedEmailResolver, SessionEmailResolver |
97 | | }}} |
98 | | |
99 | | Then the only resolver that will ever be checked would be DefaultDomainResolver-- it blindly appends a domain name, after all. Its best for last. |
100 | | |
101 | | The recommended setting is: |
102 | | |
103 | | {{{ |
104 | | [announcer] |
105 | | email_address_resolvers = SpecifiedEmailResolver, SessionEmailResolver |
106 | | }}} |
107 | | |
108 | | Unless you're in an intranet setup and DefaultDomainResolver is appropriate at the end. |
109 | | |
110 | | === Plugins === |
111 | | |
112 | | The AnnouncerPlugin has plugins to support the following Trac plugins: |
113 | | [[TitleIndex(AnnouncerPlugin/PluginSupport/)]] |
114 | | |
115 | | == Bugs/Feature Requests == |
116 | | |
117 | | Existing bugs and feature requests for AnnouncerPlugin are |
118 | | [report:9?COMPONENT=AnnouncerPlugin here]. |
119 | | |
120 | | If you have any issues, create a |
121 | | [/newticket?component=AnnouncerPlugin&owner=doki_pen new ticket]. |
| 5 | == Overall description == |
| 6 | |
| 7 | The AnnouncerPlugin provides an alternative notification system, that can be used to completely replace the default [t:wiki:TracNotification TracNotification]. |
| 8 | |
| 9 | Improve '''users''' Trac experience.[[BR]] |
| 10 | With growing number of both tickets and wiki pages, keeping yourself up-to-date on recent changes is a time consuming task and easy to miss some important information. The bigger your Trac application and user base, the more important is a flexible announcement system. At the very least, it will allow users to receive ''notices about attachments'', and to ''opt-out from receiving messages'' due to the always_notify_(owner|reporter|updater) options. AnnouncerPlugin has ''wiki subscription'' capabilities ^[1]^ and provides each registered user with a large set of options to adapt change notifications to individual demand. |
| 11 | |
| 12 | Get room for promising '''development'''.[[BR]] |
| 13 | AnnouncerPlugin is as modular as Trac itself. It's easy to add new capabilities to the framework, i.e. see [wiki:WatchlistPlugin WatchlistPlugin] for easy ''per-wiki-page announcement'' registration and ''one-click ticket subscriptions'' challenging Trac's classic Cc ticket field. AnnouncerPlugin is meant to be agnostic to what is being watched, where you should send something (email, IRC, jabber, ...), and what format it should look at, so [wiki:AnnouncerPlugin/PluginSupport/FullBlogPlugin blog support] is barely the beginning. It has still a lot more possibilities to discover. The full system (in the not-too-distant-future) will allow users to 'subscribe' to certain events by specifying simple yet powerful rules, such as asking to receive an announcement for any change that involves a ticket with a priority greater then 'high'. AnnouncerPlugin is meant to be [t:wiki:TracDev/Proposals/Announcer '''the future of TracNotification''']. |
| 14 | |
| 15 | '''Secure''' your knowledge.[[BR]] |
| 16 | While sharing all knowledge is a great idea in a perfect world, real-world businesses commonly rely on tight informational restrictions, that customers can rely on. In professional communication cryptographically signed and encrypted email is essential. AnnouncerPlugin will become a building block of this new [t:wiki:TracDev/TrustedTrac Trusted Trac] information management. It's OpenPGP support is [wiki:AnnouncerPlugin/MessageEncryption already on the way]. |
| 17 | |
| 18 | ^[1]^ see WikiNotificationPlugin for another approach |
191 | | |
192 | | So, basically, for a system that is basically compatible with your existing setup and allowing minimally invasive wiki features, the following is suggested in trac.ini: |
193 | | |
194 | | {{{ |
195 | | [components] |
196 | | announcerplugin.* = enabled |
197 | | announcerplugin.subscribers.ticket_groups.* = disabled |
| 98 | For better collaborate with the [WatchlistPlugin#AnnouncerPlugin WatchlistPlugin] the two contextual navigation items ''Watch This''/''Unwatch This'' on the wiki page can be renamed by specifying the following in the `[announcer]` section. An empty value removes them completely. |
| 99 | {{{ |
| 100 | ctxtnav_names = Notify me, Do not notify me |
| 101 | }}} |
| 102 | |
| 103 | === Modular per-user configuration === |
| 104 | |
| 105 | The plugin itself is very modular, and exactly what features you have will depend on which modules you enable. You select modules in the 'Plugins' page of the 'Admin' section of your trac as stated the [#Centralconfiguration previous section]. |
| 106 | |
| 107 | ==== Legacy Modules ==== |
| 108 | |
| 109 | These mimic the standard trac notification that has been in Trac for awhile. In all cases, they are configured via the [announcer] section of the trac.ini. In most cases, the options are identical to what was previously in the [notification] section. In fact its recommended that you simply rename [notification] to [announcer] if you are going to be using any of these compatibility modules. |
| 110 | |
| 111 | * ''!StaticTicketSubscriber'': If enabled, this module will obey the ''smtp_always_bcc'' option to deliver a copy of every announcement sent out to a single address. |
| 112 | |
| 113 | * ''!LegacyTicketSubscriber'': If enabled, this module will obey the ''always_notify_owner'', ''always_notify_reporter'' and ''always_notify_updater'' option, except that individual users may choose to opt-out of this on a per-option basis. So if you don't want to receive messages just because you are the reporter, you can uncheck that. |
| 114 | |
| 115 | * ''!CarbonCopySubscriber'': If enabled, any name (or address) put into the CC field of a ticket will receive a notification. ''Note'': I recommend you turn this off and instead use the CC field for groups and the Watch This feature for CC's! See below. |
| 116 | |
| 117 | [[Image(TicketNotificationPreferences.png)]] |
| 118 | |
| 119 | ==== Groups ==== |
| 120 | |
| 121 | With the ''joinable_groups'' option in the [announcer] section, the Trac Admins can create any number of joinable groups. Any users may then in their preferences choose to join them by simply clicking to opt-into the membership. |
| 122 | |
| 123 | This feature is provided by ''!JoinableGroupSubscriber'', and is meant to create targeted groups of people that should be notified about certain important issues. One example might be 'security' that security-related bugs should notify everyone about. Another might be 'sitedown' that represents a critical failure at a customer's site where you want to be sure to notify certain high level management in your company. |
| 124 | |
| 125 | In any case, by prepending the group with an @ and adding it into the CC box, everyone who has opted into that group will receive notification of changes to that ticket. E.g., adding '@security' to the CC field will send the security team a message whenever someone alters it. The !CarbonCopySubscriber ignores any such entries (if its enabled at all) |
| 126 | |
| 127 | [[Image(AnnouncerPlugin:Groups-Prefs.jpg)]] |
| 128 | |
| 129 | ==== Watches ==== |
| 130 | |
| 131 | If ''!WatchSubscriber'' is enabled, then in the context-sensitive navigation portion of each ticket and wiki page, a 'Watch This' link will be provided. Clicking on it will add you to the watch list for the resource-- any changes to it will be sent to you. This can be in addition to the CC field if you have !CarbonCopySubscriber enabled, or you can use it to replace the functionality. When a page is already watched, the link changes to 'Unwatch This' |
| 132 | |
| 133 | [[Image(AnnouncerPlugin:WatchThis.png)]] |
| 134 | |
| 135 | ==== General Wiki ==== |
| 136 | |
| 137 | If you would like to receive more general notice of wiki changes, you can use the ''!GeneralWikiSubscriber''. With it you may specify any number of patterns, and if they match a wiki page name, you'll receive a notice if that page is created, edited, deleted, or such. |
| 138 | |
| 139 | In particular, you may use a pattern of '*' and you'll see any wiki changes that happen on the site. |
| 140 | |
| 141 | This is particularly useful in situations where the wiki uses a hierarchal structure; so if you use a pattern such as 'Project*', then 'Project/Plan' and 'Project/Concerns' will all match. |
| 142 | |
| 143 | [[Image(AnnouncerPlugin:GeneralWiki.png)]] |
| 144 | |
| 145 | ==== Formatters ==== |
| 146 | |
| 147 | For tickets, both a plain text and HTML formatter are currently supplied, and you may choose which you wish to receive in your preferences. For wiki pages, only a plain text notice is currently available. |
| 148 | |
| 149 | The HTML formatter also sends out a plain text alternative for those email clients that may not support HTML email. |
| 150 | |
| 151 | The following trac.ini options are available to configure the ticket formatter: |
| 152 | |
| 153 | ticket_email_subject:: |
| 154 | Determines the subject of the email that is sent out. Defaults to ''Ticket #${ticket.id}: ${ticket!['summary']}''. |
| 155 | ticket_email_header_fields:: |
| 156 | A list of fields that are always sent at the top of the email notification; Defaults to ''owner, reporter, milestone, priority, severity''. |
| 157 | |
| 158 | [[Image(AnnouncerPlugin:HtmlEmail.jpg)]] |
| 159 | |
| 160 | |
| 161 | ==== Distributors ==== |
| 162 | |
| 163 | Although the goal is to allow many kinds of distribution, at this point we're only delivering to email addresses. The ''!EmailDistributor'' uses the same options as the old trac notification, just (as above) in the ''announcer'' section and not the ''notification'' section. Some options it doesn't quite use yet but will in the future. |
| 164 | |
| 165 | There are a few additional ones: |
| 166 | * use_threaded_delivery: If Python is built with threads, this option will speed up actual delivery by a second or two-- that's not a long time, but it's time not spent delaying a request from going through. |
| 167 | * default_email_format: This should be either 'text/plain' or 'text/html' and represents the default format that it sends email as. Users may override this in their preferences. |
| 168 | * email_address_resolvers: An ordered list of resolvers (see below) that the distributor uses to map usernames to email addresses. The first one that returns an address, wins. |
| 169 | |
| 170 | ==== Resolvers ==== |
| 171 | |
| 172 | Currently, the following resolvers can be configured to map usernames to email addresses: |
| 173 | |
| 174 | * ''!DefaultDomainResolver'': This will simply blindly append the domain specified in [announcer] smtp_default_domain onto the end of the username. |
| 175 | * ''!SpecifiedEmailResolver'': This will allow the user to override the email address in Trac (or anywhere else) to demand all email be sent to a certain address specified in their user preferences (and separate from Trac's normal address) |
| 176 | * ''!SessionEmailResolver'': This will retrieve the email address associated with the username's Trac session. |
| 177 | |
| 178 | The order is important: if you specify resolvers as |
| 179 | |
| 180 | {{{ |
199 | | email_enabled = true |
200 | | }}} |
201 | | |
202 | | === Configuration === |
203 | | |
204 | | This plugin may break notifications from other Trac plugins that use the default Trac notification system. A plugin that sends notifications using the t:TracNotifications system needs to be modified to use the AnnouncerPlugin API. For example, see [AnnouncerPlugin/PluginSupport/FullBlogPlugin FullBlogPlugin]. |
205 | | |
206 | | The easiest way to configure Announcer is to first configure the Trac notification system as described in t:TracNotification, and then simply rename the `[notification]` section in your ''trac.ini'' to `[announcer]`. Where possible, the option names are the same. Additional options that may be available are specified above in the modules section. |
207 | | |
208 | | For better collaborate with the [WatchlistPlugin#AnnouncerPlugin WatchlistPlugin] the two contextual navigation items ''Watch This''/''Unwatch This'' on the wiki page can be renamed by specifying the following in the `[announcer]` section. An empty value removes them completely. |
209 | | {{{ |
210 | | ctxtnav_names = Notify me, Do not notify me |
211 | | }}} |
212 | | |
213 | | == About i18n/l10n support == |
| 182 | email_address_resolvers = DefaultDomainResolver, SpecifiedEmailResolver, SessionEmailResolver |
| 183 | }}} |
| 184 | |
| 185 | Then the only resolver that will ever be checked would be !DefaultDomainResolver-- it blindly appends a domain name, after all. Its best for last. |
| 186 | |
| 187 | The recommended setting is: |
| 188 | |
| 189 | {{{ |
| 190 | [announcer] |
| 191 | email_address_resolvers = SpecifiedEmailResolver, SessionEmailResolver |
| 192 | }}} |
| 193 | |
| 194 | Unless you're in an intranet setup and !DefaultDomainResolver is appropriate at the end. |
| 195 | |
| 196 | === Plugins === |
| 197 | |
| 198 | The AnnouncerPlugin has plugins to support the following Trac plugins: |
| 199 | [[TitleIndex(AnnouncerPlugin/PluginSupport/)]] |
| 200 | |
| 201 | == Bugs/Feature Requests == |
| 202 | |
| 203 | Existing bugs and feature requests for AnnouncerPlugin are |
| 204 | [report:9?COMPONENT=AnnouncerPlugin here]. |
| 205 | |
| 206 | If you have any issues, create a |
| 207 | [/newticket?component=AnnouncerPlugin&owner=doki_pen new ticket]. |
| 208 | |
| 209 | == Development Version == |
| 210 | |
| 211 | The trunk branch has been under heavy development and changes a number of things in the AnnouncerPlugin. One key change is the module naming convention. If you upgrade from early versions of AnnouncerPlugin, you will need to edit your `trac.ini` components section and change any reference to announcerplugin to announcer. There are many other module changes, so it's probably best to use the Trac plugin admin to configure AnnouncerPlugin after an upgrade. |
| 212 | |
| 213 | I am currently developing AnnouncerPlugin against Trac 0.12 and python 2.6. I can't think of any reason it won't work with older version, but buyer beware. I am always willing to accept patches. |
| 214 | |
| 215 | As stated before, as of [8087] there is preliminary support for sending encrypted and/or cryptographically signed emails. OpenPGP support is provided by [http://www.gnupg.org/ GnuPG] and working only with plain text formatted messages by now. There's still a lot to be done. See more details at the corresponding [wiki:AnnouncerPlugin/MessageEncryption development page]. |
| 216 | |
| 217 | === About i18n/l10n support === |
| 218 | |