Feature #4522

Allow setting of custom fields in redmine:email:receive_imap

Added by Ian Gustafson almost 8 years ago. Updated almost 3 years ago.

Status:NewStart date:2010-01-05
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email receiving
Target version:-
Resolution:

Description

Currently users can set values of custom fields upon issue creation via email (provided that the field is specified using the allow_override option). However, as far as I can tell there is no way to assign a fixed value for a custom field in the options for the rake command. You can do this for Redmine's built-in fields (ex. priority=Low).

It would be great to be able to do that, because it would allow me to set various email address that automatically classify issues based on where they were emailed without the user having to insert special lines in the body of the email (I know "Category" can be used for this, but I think many Redmine admins like me require several custom attributes to be set in addition).

History

#1 Updated by Pedro Gutierrez over 6 years ago

Hi Ian,
I have the same problem.
Did you find any solution?

There is a similar problem posted in the forums but as you can see, there is no answer.

#2 Updated by Gregor K about 4 years ago

I also like to see this fixed. Specially for mandatory fields this is very useful to prevent the emails from being ignored without any further notice.

#3 Updated by Stanislav German-Evtushenko almost 3 years ago

I can add a required field directly to the code but it would be nice to be able to do this in a proper way.

--- mail_handler.rb    (revision 12902)
+++ mail_handler.rb    (working copy)
@@ -50,7 +50,7 @@
   # Use when receiving emails with rake tasks
   def self.extract_options_from_env(env)
     options = {:issue => {}}
-    %w(project status tracker category priority).each do |option|
+    %w(project status tracker category priority due_date).each do |option|
       options[:issue][option.to_sym] = env[option] if env[option]
     end
     %w(allow_override unknown_user no_permission_check no_account_notice default_group).each do |option|

Also available in: Atom PDF