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. [SOLVED] OpenProject 3: Email on work package update – should it work?

[SOLVED] OpenProject 3: Email on work package update – should it work?

Added by Daniel Jagszent about 11 years ago

I’m using OpenProject 3 (3.0.0pre44) and successfully configured email notifications (the test email works, email on work package creation works, I activated all actions in Settings -> Email notifications )

But I do not get any email notifications when a work package gets updated.

Can it be that the logic for that is missing in OpenProject 3? I had a peek in the source and found https://github.com/opf/openproject/blob/dev/app/models/journal_observer.rb – doesn’t look like the necessary after_update hook is present. But maybe I’m missing something?


Replies (7)

RE: OpenProject 3: Email on work package update – should it work? - Added by Hagen Schink about 11 years ago

Hi Daniel,

have you set up delayed job

Kind regards,
Hagen

RE: OpenProject 3: Email on work package update – should it work? - Added by Christian Ratz about 11 years ago

we send the email notifications on work package update delayed since the amount of recipients is not known and maybe very large. For the delay we use delayed_job from collectiveidea (https://github.com/collectiveidea/delayed_job/). On this page you can find how to use the delay_job.

A short how to:

First you should delete all entries in the ‘delayed_jobs’ table except you want to deliver ALL OLD emails from work package update.
Than you can start the delayed job:

Switch to OpenProject main folder (rails root) and run this command (adapt the RAILS_ENV to your current rails env):

RAILS_ENV=production script/delayed_job start

To stop the delayed job you can run the following command:

RAILS_ENV=production script/delayed_job stop

Be aware that you have to stop the delayed_job if you change (eg. update) the OpenProject code and start the delayed_job afterwards since the delayed_job runs with the code which it founds on startup.

RE: OpenProject 3: Email on work package update – should it work? - Added by Daniel Jagszent about 11 years ago

Thanks! Works like a charm!

RE: [SOLVED] OpenProject 3: Email on work package update – should it work? - Added by Denis Lamotte about 11 years ago

i’m using the same version OpenProject 3 (3.0.0pre44), have setup Delayed_jobs and i’m using sendmail for delivery. I successfully use sendmail with 4 chiliprojects on the same server.

production:
email_delivery_method: :sendmail
default:
email_delivery_method: :sendmail
———————————————————————————————————————————————————————————
no mail is sent when i look in the /var/mail/log but i see that mails are sent in the production log
Completed 200 OK in 693.5ms (Views: 440.3ms | ActiveRecord: 104.6ms)
Rendered user_mailer/_issue_details.html.erb (17.3ms)
Rendered user_mailer/issue_updated.html.erb within layouts/user_mailer (22.7ms)
Rendered user_mailer/_issue_details.text.erb (5.0ms)
Rendered user_mailer/issue_updated.text.erb within layouts/user_mailer (6.1ms)

Sent mail to paperjam@gmail.com (25.1ms)
2014-02-19T13:37:36+0100: [Worker(delayed_job host:[edited] pid:20255)] Class#issue_updated completed after 0.1458
Rendered user_mailer/_issue_details.html.erb (18.5ms)
Rendered user_mailer/issue_updated.html.erb within layouts/user_mailer (24.2ms)
Rendered user_mailer/_issue_details.text.erb (5.5ms)
Rendered user_mailer/issue_updated.text.erb within layouts/user_mailer (6.6ms)

Sent mail to denis.lamotte@gmail.com (27.0ms)
2014-02-19T13:37:36+0100: [Worker(delayed_job host:[edited] pid:20255)] Class#issue_updated completed after 0.1495
2014-02-19T13:37:36+0100: [Worker(delayed_job host:[edited] pid:20255)] 2 jobs processed at 4.9726 j/s, 0 failed …
———————————————————————————————————————————————————————————

how can i debug this ?

RE: [SOLVED] OpenProject 3: Email on work package update – should it work? - Added by Christian Ratz about 11 years ago

Hi Denis,

I’m not sure if it is related to copy&paste but since the email configuration is done in a yml file the indentation is important and your config should look like this:

production:
  email_delivery_method: :sendmail
default:
  email_delivery_method: :sendmail

Btw. OpenProject mail configuration should work exactly like chiliproject one

Best
Ratzi

RE: [SOLVED] OpenProject 3: Email on work package update – should it work? - Added by Denis Lamotte about 11 years ago

it is the case, yes it’s a valid yaml file

well i keep looking :(

RE: [SOLVED] OpenProject 3: Email on work package update – should it work? - Added by Denis Lamotte about 11 years ago

Well, from what i see many work_packages created/updated does not created the delayed_jobs entries.

With

production:
  email_delivery_method: :sendmail
  sendmail_arguments: " -i "
  sendmail_location: "/usr/sbin/sendmail"

i was able to receive 2 emails on 10 tasks created with the same options except the content, that’s weird !!

Updating TimeEntries does not seems to trigger any mail, nor the creation of a sub tasks.

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