Hello,
I'm pretty new in Mantis and trying to do some customizations.
I'm writing a custom function (after a bug is created) and would like to retrieve the values of a custom field (Tester in my case, which is an enumeration field).
I can retrieve value of default field by the following code
$t_bug = bug_get($p_issue_id);
$t_priority = $t_bug->priority;
Does someone know how to do ?
Thank you in advance,
Georges.
Ps: sorry if I posted in bad forum section or if the question has already been answered somewhere. I didn't find anything.
Retrieve custom field value from php code
Moderators: Developer, Contributor
Re: Retrieve custom field value from php code
use this function declared in custom_field_api.php
Code: Select all
custom_field_get_value( $p_field_id, $p_bug_id );
Re: Retrieve custom field value from php code
hi,
does this function also work dynamically?
i mean when i'm actually report an issue and change the value in a custom enumeration field,
so that the next custom enumeration field can get the selected data of the previous field and
gets according to this its data dynamically from the database?
i hope my question is intelligible.
does this function also work dynamically?
i mean when i'm actually report an issue and change the value in a custom enumeration field,
so that the next custom enumeration field can get the selected data of the previous field and
gets according to this its data dynamically from the database?
i hope my question is intelligible.

-
- Posts: 408
- Joined: 28 Jan 2011, 18:47
- Location: France
- Contact:
Re: Retrieve custom field value from php code
Hello
not sure i have correctly understood your answer but is that you want for example :
2 custom field :
1 - "Country" with values "France, USA, England"
2 - "Town" which will have dynamically values
if you select "France" you will have in the 2nd custom field list towns "Paris, Nantes, Lille" etc
if you select "USA" : "new york, washington, chicago" etc
if you select "England" : "London, Liverpool, manchester" etc
and without sending form ?
so you have to use AJAX no ?
not sure i have correctly understood your answer but is that you want for example :
2 custom field :
1 - "Country" with values "France, USA, England"
2 - "Town" which will have dynamically values
if you select "France" you will have in the 2nd custom field list towns "Paris, Nantes, Lille" etc
if you select "USA" : "new york, washington, chicago" etc
if you select "England" : "London, Liverpool, manchester" etc
and without sending form ?
so you have to use AJAX no ?
Lapinkiller,
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055