How to have issue reports prefilled with default values?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Knubbi
Posts: 22
Joined: 14 May 2017, 14:35

How to have issue reports prefilled with default values?

Post by Knubbi »

It is very tedious to report issues as many inputs in various drop-down menus have to made.

Is there any way to pre-fill info with predefined default values?
mt3.png
mt3.png (40.23 KiB) Viewed 3683 times
E.g. by calling "bug_report_page.php" with parameters like /bug_report_page.php?priority=2&product_version=2 ?

We most often have to enter the same options over and over and over again which makes it very tedious.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to have issue reports prefilled with default values?

Post by atrol »

It's possible.
Have a look at the following piece of code for the names of the parameters (it's the first parameter of the gpc_get_* functions, e.g. category_id, severity, ...)

Code: Select all

	$f_build				= gpc_get_string( 'build', '' );
	$f_platform				= gpc_get_string( 'platform', '' );
	$f_os					= gpc_get_string( 'os', '' );
	$f_os_build				= gpc_get_string( 'os_build', '' );
	$f_product_version		= gpc_get_string( 'product_version', '' );
	$f_target_version		= gpc_get_string( 'target_version', '' );
	$f_profile_id			= gpc_get_int( 'profile_id', 0 );
	$f_handler_id			= gpc_get_int( 'handler_id', 0 );

	$f_category_id			= gpc_get_int( 'category_id', 0 );
	$f_reproducibility		= gpc_get_int( 'reproducibility', (int)config_get( 'default_bug_reproducibility' ) );
	$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_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' ) );
	$f_due_date				= gpc_get_string( 'due_date', date_strtotime( config_get( 'due_date_default' ) ) );
Please use Search before posting and read the Manual
Knubbi
Posts: 22
Joined: 14 May 2017, 14:35

Re: How to have issue reports prefilled with default values?

Post by Knubbi »

Great, will check it out.

Default prefills are so importatnt, that you might want to consider adding it into the configuration.
Post Reply