Product Version in email

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
rleo

Product Version in email

Post 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
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

What doesn't work about this?
rleo

RE

Post by rleo »

The field Product Version will hot emailed and I don´t know why.
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

What is sent?
rleo

Re

Post 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.
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

Try $row['version'] .
rleo

Re

Post 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
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

'os_build'
rleo

Re

Post by rleo »

Many Thanks :-)
atomoid

wish it were this easy

Post 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.
atomoid
Posts: 108
Joined: 18 Aug 2005, 00:46
Location: santa cruz, ca

Post 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...
Post Reply