software:openproject:mail
Differences
This shows you the differences between two versions of the page.
software:openproject:mail [2020/07/06 20:12] – created rodolico | software:openproject:mail [2020/07/06 22:49] (current) – rodolico | ||
---|---|---|---|
Line 27: | Line 27: | ||
If the e-mail is successfully parsed, the actions are taken and the e-mail is moved to the // | If the e-mail is successfully parsed, the actions are taken and the e-mail is moved to the // | ||
- | Run the script one time to verify you get no errors. | + | Run the script one time to verify you get no errors. |
+ | |||
+ | If you get no errors, you can either put it someplace and set up the crontab, or (on Debian based systems), put it in / | ||
+ | |||
+ | The format of the e-mail is very important. One thing that messed me up was the Project: field. It is **not** the name of the project, but is the project ID. | ||
+ | |||
+ | Some special things in the e-mail are used: | ||
+ | - **From**: The address the e-mail comes from **must** match an existing user in OpenProject. This becomes the creator of the ticket. | ||
+ | - **Subject**: | ||
+ | - **CC**: Anyone CC'd on the e-mail becomes a watcher on the task, assuming they are in the OpenProject instance | ||
+ | - **Attachments**: | ||
+ | |||
+ | I'm not going to describe all of the keys (see Format of the emails in the docs link above), just the ones I care about. These will be put in the body of the e-mail,, one to a line, with a colon separating the keyword and the value. Anything not parsed this way becomes the body of the ticket. | ||
+ | |||
+ | ^ Keyword ^ Value ^ Notes ^ Example ^ | ||
+ | | Project | Project ID | This is NOT the project name. See * | Project: build-something | | ||
+ | | Assignee | email or login | Must be a valid user for the project | Assignee: rod | | ||
+ | | Type | Type of ticket | See available types for a Work Package * | Type: Bug | | ||
+ | | Start Date | Date it should start | | Start Date: 2015-02-28 | | ||
+ | | Due Date | Date required | | Due Date: 2015-03-01 | | ||
+ | | Done Ratio | an integer | This is the percentage accomplished | Done Ratio: 40 | | ||
+ | | Status | Status | See available statuses | Status: new | | ||
+ | | Priority | Priority | See available priorities | Priority: Normal | | ||
+ | |||
+ | * You can find a project ID by opening a project in OpenProject and looking at the URL. It is the last section of the URL after the word projects, ie https:// |
software/openproject/mail.1594084364.txt.gz · Last modified: 2020/07/06 20:12 by rodolico