Product Version in email
Moderators: Developer, Contributor
-
rleo
Product Version in email
Hi,
how can I implement the field "Product Version" than email field?
I add following lines already in section # custom fields formatting of email_api.php
$t_message .= lang_get( 'email_product_version' ) . "Product version: \n".wordwrap( $p_visible_bug_data['email_product_version'] )."\n";
$t_bug_data['email_product_version'] = $row['product_version'];
Thanks for help
how can I implement the field "Product Version" than email field?
I add following lines already in section # custom fields formatting of email_api.php
$t_message .= lang_get( 'email_product_version' ) . "Product version: \n".wordwrap( $p_visible_bug_data['email_product_version'] )."\n";
$t_bug_data['email_product_version'] = $row['product_version'];
Thanks for help
-
atomoid
wish it were this easy
the above doesnt work for me. There must be a lot unmentioned in this thread. I scoured this forum for helpful posts along these lines but this is as good advice as i have found. If anyone can give a link to a better description of how to approach editing the email content, please advise...
Basically, my mission is merely to add 'version' and 'platform' data fields to the emails. So, as this thread describes above (to the best of my ability to decipher its context), i added the lines to my "email_api.php" file (under the "# custom fields formatting" section inside of the foreach loop):
Here it is with surrounding context to show where I put the lines:
--------------------
# 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";
# these two lines below are my only additions
$t_message .= lang_get( 'email_product_version' ) . "Product version: ".wordwrap($p_visible_bug_data['email_product_version'] )."\n";
$t_bug_data['email_product_version'] = $row['version'];
} # end foreach custom field
----------------------
This results in:
"APPLICATION WARNING #300: String 'email_product_version' not found."
Im a php/mysql noob but figure I am trying to populate a nonexistant array here, but i have no idea how many other files i need to edit or how to approach this. I have tried all sorts of other stuff to no avail. It seems strange that this thread suggests that these couple lines should actually work. Perhaps it used to in an older version of Mantis but no longer does in 1.0?
Suggestions are desperately welcomed and much appreciated.
Basically, my mission is merely to add 'version' and 'platform' data fields to the emails. So, as this thread describes above (to the best of my ability to decipher its context), i added the lines to my "email_api.php" file (under the "# custom fields formatting" section inside of the foreach loop):
Here it is with surrounding context to show where I put the lines:
--------------------
# 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";
# these two lines below are my only additions
$t_message .= lang_get( 'email_product_version' ) . "Product version: ".wordwrap($p_visible_bug_data['email_product_version'] )."\n";
$t_bug_data['email_product_version'] = $row['version'];
} # end foreach custom field
----------------------
This results in:
"APPLICATION WARNING #300: String 'email_product_version' not found."
Im a php/mysql noob but figure I am trying to populate a nonexistant array here, but i have no idea how many other files i need to edit or how to approach this. I have tried all sorts of other stuff to no avail. It seems strange that this thread suggests that these couple lines should actually work. Perhaps it used to in an older version of Mantis but no longer does in 1.0?
Suggestions are desperately welcomed and much appreciated.