Incoming email: create issues with mandatory custom fields
Added by Andrea Saccavini almost 13 years ago
Hi
is there the possibility to create issues from incoming IMAP emails when in the project are defined one or more mandatory custom fields?
Thanks for any suggestion!
Andrea
Replies (10)
RE: Incoming email: create issues with mandatory custom fields
-
Added by Mischa The Evil almost 13 years ago
Yes, with current Redmine versions this is possible. Just include them as keyword:value pairs in your emails like:
Custom field name: Value (for booleans: Yes/No)
RE: Incoming email: create issues with mandatory custom fields
-
Added by Andrea Saccavini almost 13 years ago
Thanks!
RE: Incoming email: create issues with mandatory custom fields
-
Added by Boris B about 11 years ago
Hi,
I'm trying too to creat issues from incoming IMAP with custom fields and I tried many things that don't worked,
it seem's that what you mentionned before works but I can't do this,
so does anyone has an example of rake command that create new issue by incoming IMAP with custom fields ?
Thanks,
RE: Incoming email: create issues with mandatory custom fields
-
Added by Thomas Godard about 11 years ago
Hi,
Was your rake command working properly before you tried to add mandatory custom fields ?
I just made a test on my Redmine instance version 2.3.1 and it still works. Could you give more details of your configuration and maybe screens.
RE: Incoming email: create issues with mandatory custom fields
-
Added by Boris B about 11 years ago
Hi,
thank you for your answer, my rake command worked correctly without mandatory custom fields,
my rake command that works :
rake -f /var/www/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=XXX username=XXX password=XXX ssl=SSL port=993 project=XXX move_on_success=Redmine move_on_failure=Redmine_KO tracker="Demande Client" --tracei tried to add mandatory (or not) custom fields with rake like :
custom_field[9]="Aucun" : KO
custom_field_9="Aucun" : KO
custom_field_values_9="Aucun" : KO
thank you for your help,
RE: Incoming email: create issues with mandatory custom fields
-
Added by Thomas Godard about 11 years ago
You are trying to put some of your custom fields in your rake command to have a default setting if nothing is specified in the email, am I right ?
If you do not seek any default configuration, you do not need to put your mandatory custom field in your rake command. Just put it in your e-mail body. If the mandatory custom field value is not in the e-mail, it will be ignored.
RE: Incoming email: create issues with mandatory custom fields
-
Added by Boris B about 11 years ago
thank you for your answer,
it is exactly what i want to do, and i can configure my mandatory with a default value,
and in the email body, the syntax is which is mentioned before ?
Custom field name: Value (for booleans: Yes/No)
thank you
RE: Incoming email: create issues with mandatory custom fields
-
Added by Thomas Godard about 11 years ago
I actually don't know neither if it is possible to configure a default custom field in the rake command nor the syntax but you could try :
rake -f /var/www/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=XXX username=XXX password=XXX ssl=SSL port=993 project=XXX move_on_success=Redmine move_on_failure=Redmine_KO tracker="Demande Client" MCF_name="Aucun" allow_override=MCF_name --trace
If this is not working and that you still want to start importing with your mandatory custom field (MCF) even before the "default settings" are configured, the syntax Mischa and you mentionned are correct.
Like this, you will have your MCF working. As I also said before, with this "solution", if you forget to specify your MCF, your e-mail will be ignored.
RE: Incoming email: create issues with mandatory custom fields
-
Added by Boris B about 11 years ago
Thanks,
it works, with a default MCF, allow_override=MCF_name, and the modification of the MCF mentioned in the body's email,
RE: Incoming email: create issues with mandatory custom fields
-
Added by Gustavo Regal over 8 years ago
Thomas Godard wrote:
You are trying to put some of your custom fields in your rake command to have a default setting if nothing is specified in the email, am I right ?
If you do not seek any default configuration, you do not need to put your mandatory custom field in your rake command. Just put it in your e-mail body. If the mandatory custom field value is not in the e-mail, it will be ignored.
It is not possible to set default values for required custom fields, as specified in https://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails#Target-project.
Make sure that the target project doesn't use required custom fields with no default value for its issues, otherwise the creation of the issue will fail.