I want to adjust the E-Mail subject to include a word based on status change:
ticket_subject_template = $prefix <word> #$ticket.id: $summary
If the status did not change (status == old status) it should be the word "updated".
If the status did change it should either be the new status or, in case the new status is 'closed', the resolution.
Bonus points if it says "commented" if the only change was a new comment.
Unfortunately the previous ticket value are not available in the notification system. When a ticket is created,
ticket.insertis called. When a ticket is updated,ticket.save_changesis called. Both of those function resetticket._old:TicketNotifyEmailis called afterticket.insertandticket.save_changes:I think we can consider this a defect and a fix should be made in Trac. Would you mind opening a new ticket?
Once the issue is fixed, the following should work: