Changes between Version 9 and Version 10 of WorkflowNotificationPlugin
- Timestamp:
- Jan 30, 2013, 1:46:11 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WorkflowNotificationPlugin
v9 v10 87 87 [ticket-workflow-notifications] 88 88 notify_reporter_when_accepted = accept 89 notify_reporter_when_accepted.body = Hi $ticket.reporter, '$ticket.summary' has been accepted 90 by $change.author. Its status is now $ticket.status. 91 92 {% if change.comment %}$change.author said: 93 $change.comment{% end %} 94 ----- 95 Ticket URL: $link 96 $project.name <${project.url or abs_href()}> 97 $project.descr 89 notify_reporter_when_accepted.body = Hi $ticket.reporter, '$ticket.summary' has been accepted \nby $change.author. Its status is now $ticket.status. \n\n{% if change.comment %}$change.author said:\n$change.comment{% end %}\n-----\nTicket URL: $link\n$project.name <${project.url or abs_href()}>\n$project.descr\n 98 90 notify_reporter_when_accepted.recipients = $ticket.reporter, trac-admin@hostname.com, trac_user 99 91 notify_reporter_when_accepted.subject = '$ticket.summary' is now accepted … … 245 237 [ticket-workflow-notifications] 246 238 ticket_changed = * 247 ticket_changed.body = Ticket changed by $change.author: $change.comment 248 {% for field in old_ticket %}{% if old_ticket[field] != ticket[field] %} 249 $field changed: ${old_ticket[field]} => ${ticket[field]}{% end %}{% end %} 239 ticket_changed.body = Ticket changed by $change.author: $change.comment\n\n{% for field in old_ticket %}{% if old_ticket[field] != ticket[field] %}\n$field changed: ${old_ticket[field]} => ${ticket[field]}{% end %}{% end %} 250 240 ticket_changed.recipients = $ticket.reporter 251 241 ticket_changed.subject = Ticket $ticket.id has changed! 252 242 }}} 243 244 === Using Blank Lines in the Announcement Emails === 245 246 As the examples above show, you can add blank lines by typing "\n" in your email template. The plugin's code will parse these "\n" strings into actual newline characters. So, for example, a configuration like 247 248 [{{ 249 notice.body = Notification for ticket $ticket.id: $link\n\n\n\nThis is a notification. 250 }}} 251 252 should result in an email body with four blank lines between the two sentences. 253 254 This seems to work more reliably than using the .ini file's own multi-line syntax which apparently collapses whitespace. 255 256 Meanwhile, if there are any newlines whatsoever in your `.subject` configuration, the plugin will replace them with spaces. This ensures that your email will have a valid subject (email subjects cannot contain newlines). 253 257 254 258 == Recent Changes ==