Update PTML is python2 and hasn't seen development in over a decade. So it is no longer a suitable choice for us.
Still to be discussed:
* can templates be added using extensions mechanism and register a function/method to generate a message where it is called from the core code?
* this also gets around the multiple template issue below as we can name the templates and just call the replacements. E.G.
def new_message(ctx, ...): a = some calculation generating new value field_summary = print each name=value on a new line return """ A new-ticket: %(ticketid})s with value %{newvalue1}s was created. ------ %(summary)s """%{**ctx, "newval1": a, "summary": field_summary} def update_message(ctx, ...): ... def no_email_please(ctx, ...): return None instance.registerEmailTemplate('update_issue', update_message) instance.registerEmailTemplate('new_issue', new_message) instance.registerEmailTemplate('close_issue', no_email_please)
then the message body is inserted into an email and sent. If no message body is returned, the email is suppressed. ctx could be a dict of properties about the email (e.g. the To address), or it could also include info about the issue/change message etc. Also the ... could pass properties like we do for reactors and have the code probe the db and use info from the passed parameters to generate the dict used for % formatting. In theory the string to be expanded could be put in a separate file and read in and subject to % expansion/interpolation.
Old info
So far it looks like we'll be using "PTML":http://sourceforge.net/projects/ptml/ for the templating, as it's a simple enough syntax and implementation and suits plain text.
The open questions are:
* how do the new templates integrate with code?
* if multiple templates are possible, how are they selected by the tracker admin and / or end user behaviour?
* how are templates created and maintained?