Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. incoming email: creates new workpackage, but can't seem to update existing one

incoming email: creates new workpackage, but can't seem to update existing one

Added by Stan Cruise about 8 years ago

Creating a new work package via an incoming email works well.

I have tried a number of things to update an existing work package, but all attempts result in the creation of a new work package.
I figured the allow_override is important to this, but so far I have not been able to make this update an existing one.

It looks like another simple thing staring me in the face :)

Can I indulge another excellent tip?

Stan


Replies (4)

RE: incoming email: creates new workpackage, but can't seem to update existing one - Added by Stan Cruise about 8 years ago

I seem to have it working.

I had to reply to a notification email that I received by creating a work package.

Here is my sequence:

I created a new work package in Openproject.
In my separate email client, I then received the email notification.
I replied to this email, put status:Closed in the body, changed the to: address to the one the Openproject recognizes, and sent the email
This email I received in my external email client.
I moved this email into the box that I designate for Openproject to scan
I made the email ‘unread’ (learned this trick separately)
I went to Openproject; made sure I know the current status of the work package
Outside Openproject ran the rake task to scan the designated Openproject email box
Finally refreshed Openproject, and there is was: the status changed to Closed for the existing work package, and no new one was created!

I figured this out by searching Redmine for incoming email tricks. They had indicated to use the ‘issue #’ which Openproject does not seem to use.
But, then I stumbled on a description of simply replying to the email that Redmine sends out; so I did so for the Openproject email.

If this makes sense, it would be good to know.

If there is some other way to send in an update, then that would be good to know also.

However, I always send out emails for work package creation, etc, so I should always have the email to reply to.

Decoding the syntax for the reply email should be easy, and perhaps this is the route next.

Stan

RE: incoming email: creates new workpackage, but can't seem to update existing one - Added by Stan Cruise about 8 years ago

Actually the reply email does contain the ID#, but it also has other elements. Pretty simple really.

RE: incoming email: creates new workpackage, but can't seem to update existing one - Added by Stan Cruise about 8 years ago

Here is the subject line syntax I worked out for an update of an existing work package:

[ - Task #] ()

Gotchas:

The email in the designated box has to be unread

The status has to match

The send_from email address has to be correct (this was emphasized in the User Manual, but it is really easy to miss if one has >1 gmail accounts)

A forwarded email that automatically creates an attachment out of the forward text is not recognized as an attachment. If you really want the forwarded email text to be an attachment, you have to forward as an attachment, copy the attachment to a local dir, then manually attach this as a file. Then do the rake. The attachment looks the same, but OP then recognizes it as a file attachment.

Simply forwarding an email works just fine, but all the text appears in the update text of the work package. It is nicely formatted. So, this is the easiest route if you don’t mind a lot of scrolling.

All in all a very nice feature!

Now on to trying out other attributes.

RE: incoming email: creates new workpackage, but can't seem to update existing one - Added by B3 IT Systeme GmbH over 2 years ago

The processing has changed in newer OpenProject versions.

OpenProject now creates appropriate headers in the email and processes these headers when replying or forwarding.

Example Headers:

X-OpenProject-Project: foo
X-OpenProject-Issue-Id: 123
X-OpenProject-Issue-Author: foo@bar.com
X-OpenProject-Type: WorkPackage
X-OpenProject-Issue-Assignee: foo@bar.com
X-Mailer: OpenProject
X-OpenProject-Host: foo.bar.com
X-OpenProject-Site: OpenProject

The subject of the email is no longer parsed at all.

See:
https://github.com/opf/openproject/blob/21a696ef9b170e14ad2daf53364a4c2113822c2f/app/models/mail_handler.rb#L148

  • (1 - 4/4)
Loading...