Project

General

Profile

Allow version to be set via incoming email

Added by Janis Korens almost 12 years ago

I am currently using the following cron for getting e-mail to system, but I have no luck to set up correct version for incoming mails. Any comments - help. Thanks.

/usr/bin/rake -f /usr/share/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=imap.domain.com username=helpdesk012 password=xxx55xxx project=game-patch unknown_user=create move_on_success=read tracker=E-mail fixed_version=2012 priority=Normal no_permission_check=1 allow_override=status,fixed_version --trace


Replies (3)

RE: Allow version to be set via incoming email - Added by William Roush almost 12 years ago

Edit:

Bleh scratch that, looking at two different functions of code.

According to:

https://bitbucket.org/redmine/redmine-all/src/966ab6a0fa5c/app/models/mail_handler.rb#cl-315

It should be listening for the version fine.

RE: Allow version to be set via incoming email - Added by Janis Korens almost 12 years ago

I mean not from body of message, but fixed_version=2012 from Issue attributes control options from CLI

/usr/bin/rake -f /usr/share/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=imap.domain.com username=helpdesk012 password=xxx55xxx project=game-patch unknown_user=create move_on_success=read tracker=E-mail fixed_version=2012 priority=Normal no_permission_check=1 allow_override=status,fixed_version --trace

RE: Allow version to be set via incoming email - Added by William Roush almost 12 years ago

Ah yes, I originally posted instructions on that one, but didn't see fixed_version in the command line and corrected myself:

https://bitbucket.org/redmine/redmine-all/src/c06f74894d2c/lib/tasks/email.rake#cl-128 (for IMAP), only accepts these parameters:

%w(project status tracker category priority).each { |a| options[:issue][a.to_sym] = ENV[a] if ENV[a] }

I believe you can try adding "fixed_version" to that, get_keyword from https://bitbucket.org/redmine/redmine-all/src/966ab6a0fa5c/app/models/mail_handler.rb#cl-315 seems to check for @@handler_options which are passed in frmo the cod I pointed out above.

Also, you'll want to remove allow_override for fixed version, unless you want a user to be able to place it in a different version.

    (1-3/3)