Changes between Initial Version and Version 1 of Email2tracParse


Ignore:
Timestamp:
12/08/20 03:54:05 (3 years ago)
Author:
erflungued
Comment:

Copied from https://web.archive.org/web/20120124141918/http://subtrac.sara.nl/oss/email2trac/wiki/Email2tracParse

Legend:

Unmodified
Added
Removed
Modified
  • Email2tracParse

    v1 v1  
     1= How an email is being parsed =
     2
     3An email has a header and a body. The email header fields are used to set the ticket fields and the body is used for the description and attachments. See section below how the header and body are parsed.
     4== Header ==
     5=== Subject field ===
     6
     7Versions greater or equal then 1.1.0 can set the subject field separator. The default value is &. Versions prior to 1.1.0 used , as subject field separator. The examples below are for versions 1.1.0 and higher.
     8
     9The subject field determines if we must create/update:
     10
     111. ticket (default action)
     121. blog, Only if the  FullBlogPlugin is installed. If not then a ticket will be created.
     131. discussion, Only if the  DiscussionPlugin is installed. If not then a ticket will be created.
     14
     15How is the 'Subject' line parsed for tickets:
     16
     17 * Subject: Bas
     18   * will Create a ticket with Summary : Bas
     19 * Subject: Bas #?owner=bas&version=0.80
     20   * will create a ticket with Summary : Bas and owner set to bas and version set to 0.80
     21 * Subject: #4: Bas
     22   * will update ticket #4
     23 * Subject: #4?owner=jaap: Bas
     24   * will update ticket #4 and set owner to jaap
     25 * Subject: blog:bas
     26   * Will create a blog entry only if the  FullBlogPlugin is installed
     27 * Subject: blog:3 bas
     28   * Will update a blog entry
     29
     30== Body ==
     31
     32If a message's body is broken up into several pieces (by attachments in the middle of the message), the ticket's description is set to the entire body, not just the first part
     33
     34For example, from an email like this:
     35{{{
     36some text
     37<some binary>
     38more text
     39}}}
     40the ticket that is created will have "some text" and "more text" in its description and <some_binary> as attachment
     41=== Links to attachments inside the ticket description ===
     42
     43[attachment:filename] links are automatically placed inside the ticket description, so that message text can clearly refer to them.
     44
     45For example, an email like
     46{{{
     47I opened this file in your app:
     48<my file>
     49and I got the following error dialog:
     50<image>
     51}}}
     52will generate a ticket like this:
     53{{{
     54I opened this file in your app:
     55
     56[attachment:"my file"]
     57
     58and I got the following error dialog:
     59
     60[attachment:"image"]
     61}}}
     62=== Inline image attachments ===
     63
     64If an attachment is of type image/* and its Content-Disposition is inline, then a Trac Image macro is placed inside the ticket description in the appropriate place, so that the resulting ticket has the image inline where it belongs in the text.
     65
     66The same email as in the previous example, if the image is inline, will result in:
     67{{{
     68I opened this file in your app
     69
     70[attachment:"my file"]
     71
     72and I got the following error dialog:
     73
     74[[Image(image)]]
     75}}}
     76=== Update ticket fields ===
     77
     78If the inline_properties is set in email2trac.conf then we can update ticket fields within the body text, eg:
     79{{{
     80This is a Test1234
     81@owner : bas
     82@type: task
     83}}}
     84Will create ticket with body text:
     85{{{
     86This is a Test1234
     87}}}
     88and the owner field set to bas and type ticket field to task. Note the keywords will be stripped from the body text. This feature can be used for a new ticket and ticket updates.
     89
     90The format is:
     91{{{
     92@<ticket field name> : <value>
     93}}}