From: Dries S. <Dri...@cw...> - 2004-07-27 12:40:26
|
Hi, There's a bug in the 0.18.3 release. I have not checked if it is fixed in the newer release, but I fixed it for our local install. The bug is when you try to view a bug for which the reporter user's account has been removed from the system. line 402 of the bug_view_page.php has: html_buttons_view_bug_page( $f_bug_id ); The method outputs the buttons and also generates the dropdown. In the declaration, on line 649 of /core/html_api.php has the following condition: if ( ( $t_handler_id != $t_reporter_id ) && ( access_has_bug_level( config_get( 'handle_bug_threshold' ), $p_bug_id, $t_reporter_id ) ) ) { $t_options[] = array( $t_reporter_id, '[' . lang_get( 'reporter' ) . ']' ); if ( $t_default_assign_to === null ) { $t_default_assign_to = $t_reporter_id; } } This will add [reporter] in the asign dropdown if appropriate. However, if the reporter user does not exist, the application shows a fatal "user not know" error. The following fixes this by checking for the existence of the user first: if ( ( $t_handler_id != $t_reporter_id ) && user_exists( $t_reporter_id ) && ( access_has_bug_level( config_get( 'handle_bug_threshold' ), $p_bug_id, $t_reporter_id ) ) ) { $t_options[] = array( $t_reporter_id, '[' . lang_get( 'reporter' ) . ']' ); if ( $t_default_assign_to === null ) { $t_default_assign_to = $t_reporter_id; } } I have not done any mantis development in a while, so for this small fix, it's probably not worth getting the CVS version and commiting the fix. Could one of the main developers have a look and implement if found appropriate? Hope it helps. Cheers, Dries. Dries Samyn Cable & Wireless Services Web Technology Group |