Automatically add new created users (by email or ldap login) to a project in Redmine
Alright, just got this to work a couple minutes ago:
* I'm using the Redmine's rake to create issues by fetching email messages (read this):
RAILS_ENV="production" /usr/bin/rake redmine:email:receive_imap host=imap.gmail.com port=993 ssl=1 username=myemailusername@mydomain.com password=myPassword project=helpdesk unknown_user=create no_permission_check=1 no_account_notice=1
Project id: helpdesk
Default user role: Customer
* If the email address of the sender is not in Redmine's db, it will create a new user with that email. Let call it joeuser.
The problem is the new created user was not added to the project ('helpdesk'), so she will not receive any follow-up email messages (any updates of the ticket).
So, I have to modify the Redmine's core to add the new user to the helpdesk project with the Customer role:
1. New user created by the Email task:
/path/to/redmine/app/models/mail_handler.rb
2. New user created by LDAP login:
/path/to/redmine/app/models/user.rb
3. Restart Apache or nginx:
$ sudo service apache2 restart
And the world is better now!!!
* I'm using the Redmine's rake to create issues by fetching email messages (read this):
RAILS_ENV="production" /usr/bin/rake redmine:email:receive_imap host=imap.gmail.com port=993 ssl=1 username=myemailusername@mydomain.com password=myPassword project=helpdesk unknown_user=create no_permission_check=1 no_account_notice=1
Project id: helpdesk
Default user role: Customer
* If the email address of the sender is not in Redmine's db, it will create a new user with that email. Let call it joeuser.
The problem is the new created user was not added to the project ('helpdesk'), so she will not receive any follow-up email messages (any updates of the ticket).
So, I have to modify the Redmine's core to add the new user to the helpdesk project with the Customer role:
1. New user created by the Email task:
/path/to/redmine/app/models/mail_handler.rb
2. New user created by LDAP login:
/path/to/redmine/app/models/user.rb
3. Restart Apache or nginx:
$ sudo service apache2 restart
And the world is better now!!!