diff --git a/admin/schema.php b/admin/schema.php
index d2b6940..dfaeb15 100644
--- a/admin/schema.php
+++ b/admin/schema.php
@@ -608,3 +608,7 @@ $upgrade[] = Array( 'CreateIndexSQL', Array( 'idx_tag_name', db_get_table( 'mant
 $upgrade[] = Array( 'CreateIndexSQL', Array( 'idx_bug_tag_tag_id', db_get_table( 'mantis_bug_tag_table' ), 'tag_id' ) );
 $upgrade[] = Array( 'CreateIndexSQL', Array( 'idx_email_id', db_get_table( 'mantis_email_table' ), 'email_id', array( 'DROP' ) ), Array( 'db_index_exists', Array( db_get_table( 'mantis_email_table' ), 'idx_email_id') ) );
 $upgrade[] = Array( 'UpdateFunction', 'correct_multiselect_custom_fields_db_format' );
+
+/* Patch to add textareas as custom fields */
+$upgrade[] = Array( 'AddColumnSQL', Array( db_get_table( 'mantis_custom_field_string_table' ), "
+	text		XL  			NULL DEFAULT NULL " ) );
diff --git a/config_defaults_inc.php b/config_defaults_inc.php
index 63626c0..5aaedf1 100644
--- a/config_defaults_inc.php
+++ b/config_defaults_inc.php
@@ -3001,7 +3001,7 @@
 	 *
 	 * @global string $g_custom_field_type_enum_string
 	 */
-	$g_custom_field_type_enum_string    = '0:string,1:numeric,2:float,3:enum,4:email,5:checkbox,6:list,7:multiselection list,8:date,9:radio';
+	$g_custom_field_type_enum_string    = '0:string,1:numeric,2:float,3:enum,4:email,5:checkbox,6:list,7:multiselection list,8:date,9:radio,10:textarea';
 
 	/*********************************
 	 * MantisBT Javascript Variables *
diff --git a/core/cfdefs/cfdef_standard.php b/core/cfdefs/cfdef_standard.php
index e802a86..32c415c 100644
--- a/core/cfdefs/cfdef_standard.php
+++ b/core/cfdefs/cfdef_standard.php
@@ -31,6 +31,20 @@ $g_custom_field_type_definition[ CUSTOM_FIELD_TYPE_STRING ] = array (
 	'#function_string_value_for_email' => null,
 );
 
+$g_custom_field_type_definition[ CUSTOM_FIELD_TYPE_TEXTAREA] = array (
+	'#display_possible_values' => TRUE,
+	'#display_valid_regexp' => TRUE,
+	'#display_length_min' => TRUE,
+	'#display_length_max' => TRUE,
+	'#display_default_value' => TRUE,
+	'#function_return_distinct_values' => null,
+	'#function_value_to_database' => null,
+	'#function_database_to_value' => null,
+	'#function_print_input' => 'cfdef_input_textarea',
+	'#function_string_value' => null,
+	'#function_string_value_for_email' => null,
+);
+
 $g_custom_field_type_definition[ CUSTOM_FIELD_TYPE_NUMERIC ] = array (
 	'#display_possible_values' => TRUE,
 	'#display_valid_regexp' => TRUE,
@@ -300,6 +314,16 @@ function cfdef_input_textbox($p_field_def, $t_custom_field_value) {
 	echo ' value="' . string_attribute( $t_custom_field_value ) .'"></input>';
 }
 
+function cfdef_input_textarea($p_field_def, $t_custom_field_value) {
+	echo '<textarea ', helper_get_tab_index(), ' name="custom_field_' . $p_field_def['id'] . '"';
+	if( 0 < $p_field_def['length_max'] ) {
+		echo ' maxlength="' . $p_field_def['length_max'] . '"';
+	} else {
+		echo ' maxlength="255"';
+	}
+	echo 'cols="70" rows="8">' . $t_custom_field_value .'</textarea>';
+}
+
 /**
  * Prints the controls for the date selector.
  *
diff --git a/core/constant_inc.php b/core/constant_inc.php
index c47a93c..bdcab33 100644
--- a/core/constant_inc.php
+++ b/core/constant_inc.php
@@ -414,6 +414,7 @@ define( 'CUSTOM_FIELD_TYPE_LIST', 6 );
 define( 'CUSTOM_FIELD_TYPE_MULTILIST', 7 );
 define( 'CUSTOM_FIELD_TYPE_DATE', 8 );
 define( 'CUSTOM_FIELD_TYPE_RADIO', 9 );
+define( 'CUSTOM_FIELD_TYPE_TEXTAREA', 10 );
 
 # Meta filter values
 define( 'META_FILTER_MYSELF', -1 );
diff --git a/core/custom_field_api.php b/core/custom_field_api.php
index 2c97592..74d4833 100644
--- a/core/custom_field_api.php
+++ b/core/custom_field_api.php
@@ -45,6 +45,7 @@ require_once( 'date_api.php' );
 # *******************************************
 
 $g_custom_field_types[CUSTOM_FIELD_TYPE_STRING] = 'standard';
+$g_custom_field_types[CUSTOM_FIELD_TYPE_TEXTAREA] = 'standard';
 $g_custom_field_types[CUSTOM_FIELD_TYPE_NUMERIC] = 'standard';
 $g_custom_field_types[CUSTOM_FIELD_TYPE_FLOAT] = 'standard';
 $g_custom_field_types[CUSTOM_FIELD_TYPE_ENUM] = 'standard';
@@ -991,8 +992,10 @@ function custom_field_get_value( $p_field_id, $p_bug_id ) {
 		return false;
 	}
 
+	$t_value_field = ( $row['type'] == CUSTOM_FIELD_TYPE_TEXTAREA ? 'text' : 'value' );
 	$t_custom_field_string_table = db_get_table( 'mantis_custom_field_string_table' );
-	$query = "SELECT value
+
+	$query = "SELECT $t_value_field
 				  FROM $t_custom_field_string_table
 				  WHERE bug_id=" . db_param() . " AND
 				  		field_id=" . db_param();
@@ -1341,8 +1344,10 @@ function custom_field_set_value( $p_field_id, $p_bug_id, $p_value, $p_log_insert
 	$t_type = custom_field_get_field( $p_field_id, 'type' );
 	$t_custom_field_string_table = db_get_table( 'mantis_custom_field_string_table' );
 
+	$t_value_field = ( $t_type == CUSTOM_FIELD_TYPE_TEXTAREA ) ? 'text' : 'value';
+
 	# Determine whether an existing value needs to be updated or a new value inserted
-	$query = "SELECT value
+	$query = "SELECT $t_value_field
 				  FROM $t_custom_field_string_table
 				  WHERE field_id=" . db_param() . " AND
 				  		bug_id=" . db_param();
@@ -1350,16 +1355,16 @@ function custom_field_set_value( $p_field_id, $p_bug_id, $p_value, $p_log_insert
 
 	if( db_num_rows( $result ) > 0 ) {
 		$query = "UPDATE $t_custom_field_string_table
-					  SET value=" . db_param() . "
+					  SET $t_value_field=" . db_param() . "
 					  WHERE field_id=" . db_param() . " AND
 					  		bug_id=" . db_param();
 		db_query_bound( $query, Array( custom_field_value_to_database( $p_value, $t_type ), $c_field_id, $c_bug_id ) );
 
 		$row = db_fetch_array( $result );
-		history_log_event_direct( $c_bug_id, $t_name, custom_field_database_to_value( $row['value'], $t_type ), $p_value );
+		history_log_event_direct( $c_bug_id, $t_name, custom_field_database_to_value( $row[$t_value_field], $t_type ), $p_value );
 	} else {
 		$query = "INSERT INTO $t_custom_field_string_table
-						( field_id, bug_id, value )
+						( field_id, bug_id, $t_value_field )
 					  VALUES
 						( " . db_param() . ', ' . db_param() . ', ' . db_param() . ')';
 		db_query_bound( $query, Array( $c_field_id, $c_bug_id, custom_field_value_to_database( $p_value, $t_type ) ) );
diff --git a/core/filter_api.php b/core/filter_api.php
index 7b244c3..4cfd326 100644
--- a/core/filter_api.php
+++ b/core/filter_api.php
@@ -916,10 +916,11 @@ function filter_get_query_sort_data( &$p_filter, $p_show_sticky, $p_query_clause
 			if( strpos( $c_sort, 'custom_' ) === 0 ) {
 				$t_custom_field = utf8_substr( $c_sort, utf8_strlen( 'custom_' ) );
 				$t_custom_field_id = custom_field_get_id_from_name( $t_custom_field );
-
+				$t_def = custom_field_get_definition( $t_custom_field_id );
+				$t_value_field = ( $t_def['type'] == CUSTOM_FIELD_TYPE_TEXTAREA ? 'text' : 'value' );
 				$c_cf_alias = str_replace( ' ', '_', $t_custom_field );
 				$t_cf_table_alias = $t_custom_field_string_table . '_' . $t_custom_field_id;
-				$t_cf_select = "$t_cf_table_alias.value $c_cf_alias";
+				$t_cf_select = "$t_cf_table_alias.$t_value_field $c_cf_alias";
 
 				# check to be sure this field wasn't already added to the query.
 				if( !in_array( $t_cf_select, $p_query_clauses['select'] ) ) {
@@ -1902,6 +1903,10 @@ function filter_get_bug_rows( &$p_page_number, &$p_per_page, &$p_page_count, &$p
 								$t_where_params[] = '%|' . $t_filter_member . '|%';
 								array_push( $t_filter_array, db_helper_like( "$t_table_name.value" ) );
 								break;
+							case CUSTOM_FIELD_TYPE_TEXTAREA:
+								$t_where_params[] = '%' . $t_filter_member . '%';
+								array_push( $t_filter_array, db_helper_like( "$t_table_name.text" ) );
+								break;
 							default:
 								$t_where_params[] = $t_filter_member;
 								array_push( $t_filter_array, "$t_table_name.value = " . db_param() );
@@ -4021,6 +4026,8 @@ function print_filter_custom_field( $p_field_id ) {
 	} else if( isset( $t_accessible_custom_fields_names[$j] ) ) {
 		if( $t_accessible_custom_fields_types[$j] == CUSTOM_FIELD_TYPE_DATE ) {
 			print_filter_custom_field_date( $j, $p_field_id );
+		} else if( $t_accessible_custom_fields_types[$j] == CUSTOM_FIELD_TYPE_TEXTAREA ) {
+			echo '<input type="text" name="custom_field_', $p_field_id, '" size="10" value="" />';
 		} else {
 			echo '<select ' . $t_select_modifier . ' name="custom_field_' . $p_field_id . '[]">';
 			echo '<option value="' . META_FILTER_ANY . '" ';
diff --git a/core/gpc_api.php b/core/gpc_api.php
index b37bcb9..cc6961a 100644
--- a/core/gpc_api.php
+++ b/core/gpc_api.php
@@ -178,6 +178,7 @@ function gpc_isset_custom_field( $p_var_name, $p_custom_field_type ) {
 				gpc_isset( $t_field_name . '_year' ) &&
 				gpc_get_int( $t_field_name . '_year', 0 ) != 0 ;
 		case CUSTOM_FIELD_TYPE_STRING:
+		case CUSTOM_FIELD_TYPE_TEXTAREA:
 		case CUSTOM_FIELD_TYPE_NUMERIC:
 		case CUSTOM_FIELD_TYPE_FLOAT:
 		case CUSTOM_FIELD_TYPE_ENUM:
diff --git a/lang/strings_english.txt b/lang/strings_english.txt
index cff3989..c781813 100644
--- a/lang/strings_english.txt
+++ b/lang/strings_english.txt
@@ -1300,7 +1300,7 @@ $s_link_custom_field_to_project_button = 'Link Custom Field';
 $s_linked_projects = 'Linked Projects';
 
 $s_custom_field_sequence = 'Sequence';
-$s_custom_field_type_enum_string = '0:String,1:Numeric,2:Float,3:Enumeration,4:E-mail,5:Checkbox,6:List,7:Multiselection list,8:Date,9:Radio';
+$s_custom_field_type_enum_string = '0:String,1:Numeric,2:Float,3:Enumeration,4:E-mail,5:Checkbox,6:List,7:Multiselection list,8:Date,9:Radio,10:Textarea';
 
 $s_confirm_used_custom_field_deletion = 'This field is currently linked to at least one project. If you continue all values for this field will be permanently deleted. This action cannot be undone. If you do not want to delete this field, hit the Back button in your browser. To proceed, click the button below';
 $s_confirm_custom_field_deletion = 'Are you sure you want to delete this custom field and all associated values?';
diff --git a/lang/strings_french.txt b/lang/strings_french.txt
index ee919fd..4c77768 100644
--- a/lang/strings_french.txt
+++ b/lang/strings_french.txt
@@ -1022,7 +1022,7 @@ $s_link_custom_field_to_project_title = 'Lier un champ personnalisé au projet';
 $s_link_custom_field_to_project_button = 'Lier champ personnalisé';
 $s_linked_projects = 'Projets liés';
 $s_custom_field_sequence = 'Suite';
-$s_custom_field_type_enum_string = '0:Chaîne de caractères,1:Nombre entier,2:Nombre réel,3:Énumération,4:Courriel,5:Case à cocher,6:Liste,7:Liste à sélection multiple,8:Date,9:Bouton radio';
+$s_custom_field_type_enum_string = '0:Chaîne de caractères,1:Nombre entier,2:Nombre réel,3:Énumération,4:Courriel,5:Case à cocher,6:Liste,7:Liste à sélection multiple,8:Date,9:Bouton radio,10:Zone de texte';
 $s_confirm_used_custom_field_deletion = 'Ce champ est actuellement lié à au moins un projet.  Si vous continuez, toutes les valeurs de ce champ seront supprimées.  Cette action ne peut être annulée.  Si vous ne voulez pas supprimer ce champ, cliquer sur le bouton Retour de votre navigateur.  Sinon pour supprimer ce champ, cliquer sur le bouton ci dessous';
 $s_confirm_custom_field_deletion = 'Êtes vous sûr de vouloir supprimer ce champ personnalisé et toutes les valeurs associées ?';
 $s_field_delete_button = 'Supprimer le champ';
