Page 1 of 1

Hide mandatory fields

Posted: 08 Mar 2022, 13:20
by MaxMax
I want to remove all fields on the "new issue" form that shouldn't be assigned by the reporter, keep it to a minimal.
For example the field "category" is mandatory and needs a value. Can I somehow hide the field with a default value?
Removing the field from $g_bug_report_page_fields gives a database error when submitting the issue.

Code: Select all

$g_bug_report_page_fields = array(
	'additional_info',
	'attachments',
	'priority',
	'reproducibility',
	'severity',
	'steps_to_reproduce',
);
APPLICATION ERROR #11
A necessary field "category" was empty. Please recheck your inputs.
Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Re: Hide mandatory fields

Posted: 08 Mar 2022, 19:17
by atrol
You can add the following line to file config_inc.php

Code: Select all

$g_allow_no_category = ON;

Re: Hide mandatory fields

Posted: 09 Mar 2022, 13:29
by MaxMax
Tank you it did the trick... almost.
The category is blank. Can I have a default value assigned to it instead?

Re: Hide mandatory fields

Posted: 09 Mar 2022, 13:37
by cas
you could change the field in the DB to have a default value but that is not such a great idea.
Better is to have a look at the plugin called EasyEnter, have a look here:
https://github.com/mantisbt-plugins/EasyEnter

That offers what you want in my view :mrgreen: