Page 1 of 1

Add projection field in Bug_report

Posted: 10 Jan 2006, 22:04
by hugos
I will like to add projection fields in bug_report_advanced_page.php. My problem is when a click Save button and i go to check my bug... the value for projection is not saved. I display my modification, please help me!!!

I add this code in bug_report.php :

Code: Select all

      $t_bug_data->projection = gpc_get_int( 'projection');
    <input type="hidden" name="projection" value="<?php echo $t_bug_data->projection ?>" />

I add this code in constant_inc.php:

Code: Select all

    # projection
    define( 'NONE',10 ); 
    define( 'BUILD',20 );
    define( 'CONFIGURATION',30 );
    define( 'TWEAK',40 );
    define( 'MINOR_FIX',50 );
    define( 'MAJOR_REWORK',70 );
    define( 'REDESIGN',90 );
I add this code in config_inc.php:

Code: Select all

    # Default bug design when reporting a new bug
    $g_default_bug_projection = BUILD;
I add this code in bug_report_advanced_page.php :

Code: Select all

        $f_projection = $t_bug->projection;
        $f_projection = gpc_get_int( 'projection', config_get( 'default_bug_projection' ) );
         <tr <?php echo helper_alternate_class() ?>>
    <td class="category">
        <?php echo lang_get( 'projection' ) ?> <?php print_documentation_link( 'projection' ) ?>
     </td>
     <td>
        <select tabindex="3" name="projection">
            <?php print_enum_string_option_list( 'projection', $f_projection ) ?>
        </select>
    </td>
       </tr> 

OK j'ai trouvé

Posted: 11 Jan 2006, 15:48
by hugos
il faut aussi modifier la page bug_api.php

Posted: 11 Jan 2006, 17:09
by Narcissus
Hugos is right.

You need to actually change the bug API code to read and write the new value from and to the database.