View Issue Details

IDProjectCategoryView StatusLast Update
0014695mantisbtbugtrackerpublic2018-03-31 19:58
Reporterjehannes Assigned Toatrol  
PrioritylowSeverityfeatureReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.11 
Summary0014695: Ability to add a default summary or description
Description

When reporting a new issue, having a default value for summary and discription fields.

We use this for instance to prefill description with a "template" for the description.

Attached is a patch which enables this in the config.

Tagspatch
Attached Files
feature_branch.patch (6,632 bytes)   
��From fc6574b07c40ca6f269815686efa38f0c9e05236 Mon Sep 17 00:00:00 2001

From: Jehannes Stellingwerf <jehannes@ultraware.nl>

Date: Fri, 7 Sep 2012 12:57:00 +0200

Subject: [PATCH] Default values for summary and description



---

 bug_report.php          |  4 ++--

 bug_report_page.php     |  4 ++--

 config_defaults_inc.php | 12 ++++++++++++

 3 files changed, 16 insertions(+), 4 deletions(-)



diff --git a/bug_report.php b/bug_report.php

index 3f6d96c..f62523f 100644

--- a/bug_report.php

+++ b/bug_report.php

@@ -122,8 +122,8 @@ $t_bug_data->projection             = gpc_get_int( 'projection', config_get( 'de

 $t_bug_data->eta                    = gpc_get_int( 'eta', config_get( 'default_bug_eta' ) );

 $t_bug_data->resolution             = config_get( 'default_bug_resolution' );

 $t_bug_data->status                 = config_get( 'bug_submit_status' );

-$t_bug_data->summary                = trim( gpc_get_string( 'summary' ) );

-$t_bug_data->description            = gpc_get_string( 'description' );

+$t_bug_data->summary                = trim( gpc_get_string( 'summary', config_get( 'default_bug_summary' ) ) );

+$t_bug_data->description            = gpc_get_string( 'description', config_get( 'default_bug_description' ) );

 $t_bug_data->steps_to_reproduce     = gpc_get_string( 'steps_to_reproduce', config_get( 'default_bug_steps_to_reproduce' ) );

 $t_bug_data->additional_information = gpc_get_string( 'additional_info', config_get ( 'default_bug_additional_info' ) );

 $t_bug_data->due_date               = gpc_get_string( 'due_date', '');

diff --git a/bug_report_page.php b/bug_report_page.php

index baac29f..f0a217c 100644

--- a/bug_report_page.php

+++ b/bug_report_page.php

@@ -165,8 +165,8 @@ if ( $f_master_bug_id > 0 ) {

 	$f_eta					= gpc_get_int( 'eta', (int)config_get( 'default_bug_eta' ) );

 	$f_severity				= gpc_get_int( 'severity', (int)config_get( 'default_bug_severity' ) );

 	$f_priority				= gpc_get_int( 'priority', (int)config_get( 'default_bug_priority' ) );

-	$f_summary				= gpc_get_string( 'summary', '' );

-	$f_description			= gpc_get_string( 'description', '' );

+	$f_summary				= gpc_get_string( 'summary', config_get( 'default_bug_summary' ) );

+	$f_description			= gpc_get_string( 'description', config_get( 'default_bug_description' ) );

 	$f_steps_to_reproduce	= gpc_get_string( 'steps_to_reproduce', config_get( 'default_bug_steps_to_reproduce' ) );

 	$f_additional_info		= gpc_get_string( 'additional_info', config_get ( 'default_bug_additional_info' ) );

 	$f_view_state			= gpc_get_int( 'view_state', (int)config_get( 'default_bug_view_status' ) );

diff --git a/config_defaults_inc.php b/config_defaults_inc.php

index 55cbed5..d7989ae 100644

--- a/config_defaults_inc.php

+++ b/config_defaults_inc.php

@@ -1193,6 +1193,18 @@ $g_default_new_account_access_level = REPORTER;

 $g_default_bug_view_status = VS_PUBLIC;

 

 /**

+	* Default value for summary field.

+	* @global string $g_default_bug_summary

+	*/

+$g_default_bug_summary = '';

+

+/**

+	* Default value for description field.

+	* @global string $g_default_bug_description

+	*/

+$g_default_bug_description = '';

+

+/**

  * Default value for steps to reproduce field.

  * @global string $g_default_bug_steps_to_reproduce

  */

-- 

1.7.11.msysgit.1



feature_branch.patch (6,632 bytes)   

Relationships

duplicate of 0024158 closedvboctor Support providing a default value for issue description 
related to 0022187 acknowledged Ability to add placeholder text in the bug_report_page.php 
related to 0023600 closedatrol Make default values for the bug report page customisable 

Activities

dregad

dregad

2012-09-12 12:16

developer   ~0032824

Not sure I like the idea of introducing 2 more config options...
Maybe better implemented as a plugin.

Kunda

Kunda

2017-01-13 15:31

reporter   ~0055108

I posted the duplicate ticket 0022187
I'd love to know what the status on this ticket is.

Kunda

Kunda

2017-01-13 15:34

reporter   ~0055109

... though I'm wondering since my ticket mentions making placeholder text that disappears the moment the user starts entering text in to the text field.

atrol

atrol

2017-01-13 16:03

developer   ~0055110

... though Im wondering since my ticket mentions making placeholder text that disappears the moment the user starts entering text in to the text field.

Right, I was wrong when closing as duplicate.

sandyj

sandyj

2018-03-20 13:32

reporter   ~0059246

Vote for this feature request. Would be great to be able to set default value for native fields (Summary, description etc). Particularly as a way to guide how data is entered in these field. Placeholder text wouldn't allow reference to guidelines so would prefer setting default value so reporter can simply adjust it.

atrol

atrol

2018-03-24 06:14

developer   ~0059306

Closing the older issue, as there is a PR in 0024158