Cas' Community

Andere Informatie

Make note mandatory when closing issue

Started by administrator, 08 Jun 2024, 17:14:49

Previous topic - Next topic

administrator

Follow the instructions layed down in the chapter "Custom Functions" inside the Mantis Admin Guide.
The custom function should read:
function custom_function_override_issue_update_validate( $p_issue_id, $p_bug_data, $p_bugnote ) {
   if( $p_bug_data->status == CLOSED ) {
      if( strlen( trim( $p_bugnote ) ) === 0 ) {
         error_parameters( 'No Note provided, issue cannot be closed' );
         trigger_error( ERROR_VALIDATE_FAILURE, ERROR );
      }
   }
}

Powered by EzPortal