Page 1 of 1
Product Version in email
Posted: 30 May 2005, 15:31
by rleo
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
Posted: 03 Jun 2005, 01:18
by thraxisp
What doesn't work about this?
RE
Posted: 27 Jun 2005, 14:06
by rleo
The field Product Version will hot emailed and I don´t know why.
Posted: 28 Jun 2005, 20:05
by thraxisp
What is sent?
Re
Posted: 07 Jul 2005, 11:27
by rleo
He will sent only the text "Product version" but not the version number whiche I select before.
It looks that the variable of Product version is unknown.
I don´t know the correct variable.
Posted: 10 Jul 2005, 18:17
by thraxisp
Try $row['version'] .
Re
Posted: 11 Jul 2005, 08:24
by rleo
Thanks a lot!
It works fine.
Could you tell me also the variable of OS Version?. I tried "os_version" and "osversion" but it seems there are not the right variables.
Thanks
Posted: 11 Jul 2005, 15:25
by thraxisp
'os_build'
Re
Posted: 13 Jul 2005, 08:23
by rleo
Many Thanks :-)
wish it were this easy
Posted: 17 Aug 2005, 02:03
by atomoid
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.
Posted: 18 Aug 2005, 00:50
by atomoid
Referring to my above posting...
I am using Mantis 1.0 CVS
It did actually in some cases give the version in the email, usually with a '@' character on both sides, so its sort of working but i still always get the error mentioned above...