Changes between Version 10 and Version 11 of WorkflowNotificationPlugin


Ignore:
Timestamp:
Jan 30, 2013, 1:57:02 PM (11 years ago)
Author:
ejucovy
Comment:

Use ${var} instead of $var everywhere -- it's much less error-prone

Legend:

Unmodified
Added
Removed
Modified
  • WorkflowNotificationPlugin

    v10 v11  
    8787[ticket-workflow-notifications]
    8888notify_reporter_when_accepted = accept
    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
    90 notify_reporter_when_accepted.recipients = $ticket.reporter, trac-admin@hostname.com, trac_user
    91 notify_reporter_when_accepted.subject = '$ticket.summary' is now accepted
     89notify_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
     90notify_reporter_when_accepted.recipients = ${ticket.reporter}, trac-admin@hostname.com, trac_user
     91notify_reporter_when_accepted.subject = '${ticket.summary}' is now accepted
    9292}}}
    9393
     
    118118current state AFTER the workflow action has been applied); the author
    119119and comment of the current change, if any; a link to the ticket as
    120 `$link`; and the project.
     120`${link}`; and the project.
    121121
    122122All of these must be defined for each notification; the plugin will
     
    131131{{{
    132132#!ini
    133 notify_reporter_when_accepted.recipients = $ticket.reporter, trac-admin@hostname.com, trac_user
     133notify_reporter_when_accepted.recipients = ${ticket.reporter}, trac-admin@hostname.com, trac_user
    134134}}}
    135135
     
    151151[ticket-workflow-notifications]
    152152when_fixed = resolve
    153 when_fixed.body = Ticket $ticket.id has been fixed!  View it here: $link
    154 when_fixed.subject = Ticket $ticket.id is fixed!
    155 when_fixed.recipients = $ticket.cc
     153when_fixed.body = Ticket ${ticket.id} has been fixed!  View it here: ${link}
     154when_fixed.subject = Ticket ${ticket.id} is fixed!
     155when_fixed.recipients = ${ticket.cc}
    156156when_fixed.condition = ${ticket.resolution == 'fixed'}
    157157}}}
     
    182182[ticket-workflow-notifications]
    183183new_ticket = @created
    184 new_ticket.body = New ticket $ticket.summary has been created
    185 new_ticket.recipients = $ticket.owner
     184new_ticket.body = New ticket ${ticket.summary} has been created
     185new_ticket.recipients = ${ticket.owner}
    186186new_ticket.subject = New ticket created
    187187}}}
     
    197197[ticket-workflow-notifications]
    198198ticket_changed = *
    199 ticket_changed.body = View the ticket here: $link
     199ticket_changed.body = View the ticket here: ${link}
    200200ticket_changed.recipients = watchful_user, another_watchful_user
    201 ticket_changed.subject = Ticket $ticket.id has changed!
     201ticket_changed.subject = Ticket ${ticket.id} has changed!
    202202}}}
    203203
     
    219219#!ini
    220220same_status = leave
    221 same_status.body = View the ticket here: $link
     221same_status.body = View the ticket here: ${link}
    222222same_status.recipients = watchful_user, another_watchful_user
    223 same_status.subject = Ticket $ticket.id has been edited!
     223same_status.subject = Ticket ${ticket.id} has been edited!
    224224}}}
    225225
     
    237237[ticket-workflow-notifications]
    238238ticket_changed = *
    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 %}
    240 ticket_changed.recipients = $ticket.reporter
    241 ticket_changed.subject = Ticket $ticket.id has changed!
     239ticket_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 %}
     240ticket_changed.recipients = ${ticket.reporter}
     241ticket_changed.subject = Ticket ${ticket.id} has changed!
    242242}}}
    243243
     
    247247
    248248[{{
    249     notice.body = Notification for ticket $ticket.id: $link\n\n\n\nThis is a notification.
     249    notice.body = Notification for ticket ${ticket.id}: ${link}\n\n\n\nThis is a notification.
    250250}}}
    251251