Removing default fields

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
maladhal
Posts: 3
Joined: 03 Dec 2010, 16:58

Removing default fields

Post by maladhal »

I would like to remove the use of default fields from both the "View Issues" page and the "Report Issues" page. Can this be done by overriding the config or do I have to hack the php?

The fields in question are;-
Severity
Profile
Priority
Target Version
Show Sticky Issues
OS
OS Version
Platform
Tags
Note By
Sory By

(I'm running mantis 1.2.3)

Any help would be great, cheers!
atrol
Site Admin
Posts: 8536
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Removing default fields

Post by atrol »

Copy this (extract from config_deafults_inc.php) to your file config_inc.php and adjust to your needs

Code: Select all

/**
	 * An array of the fields to show on the bug report page.
	 *
	 * The following fields can not be included:
	 * id, project, date_submitted, last_updated, status,
	 * resolution, tags, fixed_in_version, projection, eta,
	 * reporter.
	 *
	 * The following fields must be included:
	 * category_id, summary, description.
	 *
	 * To overload this setting per project, then the settings must be included in the database through
	 * the generic configuration form.
	 *
	 * @global array $g_bug_report_page_fields
	 */
	$g_bug_report_page_fields = array(
		'category_id',
		'view_state',
		'handler',
		'priority',
		'severity',
		'reproducibility',
		'platform',
		'os',
		'os_version',
		'product_version',
		'product_build',
		'target_version',
		'summary',
		'description',
		'additional_info',
		'steps_to_reproduce',
		'attachments',
		'due_date',
	);

	/**
	 * An array of the fields to show on the bug view page.
	 *
	 * To overload this setting per project, then the settings must be included in the database through
	 * the generic configuration form.
	 *
	 * @global array $g_bug_view_page_fields
	 */
	$g_bug_view_page_fields = array (
		'id',
		'project',
		'category_id',
		'view_state',
		'date_submitted',
		'last_updated',
		'reporter',
		'handler',
		'priority',
		'severity',
		'reproducibility',
		'status',
		'resolution',
		'projection',
		'eta',
		'platform',
		'os',
		'os_version',
		'product_version',
		'product_build',
		'target_version',
		'fixed_in_version',
		'summary',
		'description',
		'additional_info',
		'steps_to_reproduce',
		'tags',
		'attachments',
		'due_date',
	);
Please use Search before posting and read the Manual
maladhal
Posts: 3
Joined: 03 Dec 2010, 16:58

Re: Removing default fields

Post by maladhal »

I think that only affects the bug you are viewing, I want to remove fields form the search page (see attachment)?
Attachments
page
page
search fields.JPG (122.39 KiB) Viewed 11233 times
atrol
Site Admin
Posts: 8536
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Removing default fields

Post by atrol »

Do you mean the fields of the filter section at the top of the page?
If yes, it seems that you have to hack the PHP code.
Please use Search before posting and read the Manual
Post Reply