Removing Required Fields
Moderators: Developer, Contributor
Removing Required Fields
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,
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
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
Start reading our manual, especially this chapter http://www.mantisbt.org/docs/master-1.2 ... FIG.FIELDS
Re: Removing Required Fields
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?
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
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
lol, seriously? that's it?
Curious though, why I can't remove the 'description' box. ?
Curious though, why I can't remove the 'description' box. ?
Re: Removing Required Fields
$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',
'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
$g_enable_profiles = OFF;
Re: Removing Required Fields
Rgr that, Will give it a try when I get to work. Thanks Cas.
Re: Removing Required Fields
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',
);
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
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.
Lesson learned...
Until my next issue
Cheers.
Re: Removing Required Fields
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 ?
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
Because i'm noob..heh.
I'll remove them, thanks.
I'll remove them, thanks.