Content
You are here:
incoming email: creates new workpackage, but can't seem to update existing one
Added by Stan Cruise over 7 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)
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 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
Actually the reply email does contain the ID#, but it also has other elements. Pretty simple really.
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.
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:
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