Open 'core/email_api.php'
Find the code: (about line 973)
Code: Select all
# custom fields formatting
foreach( $p_visible_bug_data['custom_fields'] as $t_custom_field_name => $t_custom_field_data ) {
$t_message .= str_pad( lang_get_defaulted( $t_custom_field_name, null ) . ': ', $t_email_padding_length, ' ', STR_PAD_RIGHT );
$t_message .= string_custom_field_value_for_email ( $t_custom_field_data['value'], $t_custom_field_data['type'] );
$t_message .= " \n";
} # end foreach custom field
Code: Select all
# custom fields formatting
foreach( $p_visible_bug_data['custom_fields'] as $t_custom_field_name => $t_custom_field_data )
{
if( $t_custom_field_name == 'Custom field name' ){# Mostrar solo x custom field en el envío de mails
$t_message .= str_pad( lang_get_defaulted( $t_custom_field_name, null ) . ': ', $t_email_padding_length, ' ', STR_PAD_RIGHT );
$t_message .= string_custom_field_value_for_email ( $t_custom_field_data['value'], $t_custom_field_data['type'] );
$t_message .= " \n";}
} # end foreach custom field
Code: Select all
# custom fields formatting
foreach( $p_visible_bug_data['custom_fields'] as $t_custom_field_name => $t_custom_field_data )
{
switch ($t_custom_field_name) {
case 'Custom field 1':
$t_message .= str_pad( lang_get_defaulted( $t_custom_field_name, null ) . ': ', $t_email_padding_length, ' ', STR_PAD_RIGHT );
$t_message .= string_custom_field_value_for_email ( $t_custom_field_data['value'], $t_custom_field_data['type'] );
$t_message .= " \n";
break;
case 'Custom field 2':
$t_message .= str_pad( lang_get_defaulted( $t_custom_field_name, null ) . ': ', $t_email_padding_length, ' ', STR_PAD_RIGHT );
$t_message .= string_custom_field_value_for_email ( $t_custom_field_data['value'], $t_custom_field_data['type'] );
$t_message .= " \n";
break;
Tested in Mantis 1.1.0a3, works fine.
Cheers !