Page 1 of 1
Removing Required Fields
Posted: 29 Jan 2013, 21:29
by wedge
Hi,
I would like to edit some of the static required fields
Example: Description, I've removed it in : *bug_revision_view.php, bug_report_page.php, bug_view_inc.php, bug_report_page.php, bug_report.php
When I try to submit a form, I get a " required field 'Description' is missing" error.
I see it in the Columns section but I'm not sure how to remove it from there, which file.
Is there somewhere else I should be looking to make this change too??
Thank You,
Re: Removing Required Fields
Posted: 29 Jan 2013, 21:40
by atrol
I recommend to use the powerful customization options of MantisBT instead of changing the source code.
Start reading our manual, especially this chapter
http://www.mantisbt.org/docs/master-1.2 ... FIG.FIELDS
Re: Removing Required Fields
Posted: 05 Feb 2013, 18:55
by wedge
I've been looking over what you posted, but I must be missing something terribly easy here.
The examples tell you to look in the constant_inc.php to make changes to overall appearance of the bug form? But everything I comment out, still appears?
Re: Removing Required Fields
Posted: 06 Feb 2013, 05:36
by atrol
Add the following lines to 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',
);
Re: Removing Required Fields
Posted: 06 Feb 2013, 14:14
by wedge
lol, seriously? that's it?
Curious though, why I can't remove the 'description' box. ?
Re: Removing Required Fields
Posted: 06 Feb 2013, 15:02
by wedge
$g_bug_report_page_fields = array(
'category_id' =>'1',
'view_state' =>'2',
'handler' =>'3',
'priority' =>'4',
'severity' =>'5',
'reproducibility' =>'6',
'platform' =>'7',
'os' =>'0',
'os_version' =>'0',
'product_version' =>'0',
'product_build' =>'0',
'target_version' =>'0',
'summary' =>'8',
'description' =>'9',
'additional_info' =>'10',
'steps_to_reproduce' =>'11',
'attachments' =>'12',
'due_date' =>'13',
);
Removed these options, but they are still available ..
'os',
'os_version',
'product_version',
target_version' =>'0',
Re: Removing Required Fields
Posted: 07 Feb 2013, 11:17
by cas
$g_enable_profiles = OFF;
Re: Removing Required Fields
Posted: 07 Feb 2013, 12:47
by wedge
Rgr that, Will give it a try when I get to work. Thanks Cas.
Re: Removing Required Fields
Posted: 07 Feb 2013, 14:31
by wedge
I still see those variables on the form.
Anything else ? heh.
This is what I created at the end of my config_inc.php file.
/* Tunables
$g_enable_profiles = OFF;
$g_bug_report_page_fields = array(
'category_id' =>'1',
'view_state' =>'2',
'handler' =>'3',
'priority' =>'4',
'severity' =>'5',
'reproducibility' =>'6',
'platform' =>'7',
'os' =>'0',
'os_version' =>'0',
'product_version' =>'0',
'product_build' =>'0',
'target_version' =>'0',
'summary' =>'8',
'description' =>'9',
'additional_info' =>'10',
'steps_to_reproduce' =>'11',
'attachments' =>'12',
'due_date' =>'13',
);
Re: Removing Required Fields
Posted: 07 Feb 2013, 15:15
by wedge
When making a Description line with /* I was not closing it off, */ which was preventing the variables from running
Lesson learned...
Until my next issue
Cheers.
Re: Removing Required Fields
Posted: 07 Feb 2013, 17:07
by wedge
Well here is my next issue
When switching off Global profiles, and using the tweak method, enough though category_id is enabled in the configuration, it does not display on the bug form.
It is needed to create a bug but it's not present. Is there a variable for that ?
Re: Removing Required Fields
Posted: 07 Feb 2013, 21:10
by atrol
You have to remove (or comment) the lines that you don't want.
I am wondering why you added the numbers.
Re: Removing Required Fields
Posted: 07 Feb 2013, 23:48
by wedge
Because i'm noob..heh.
I'll remove them, thanks.