Page 1 of 1

bug_report_page.php and auto select project

Posted: 08 Jan 2019, 07:23
by truefriend-cz
How i can for users define automaticaly select project and category from URL for my users?

Idea: I wanted public link as this format:
www.anydomain.org/bugs/bug_report_page. ... egory_id=2

Where project ID 34 is named as "Software XYZ" and category ID 2 is named as "Blabla" and auto skip Project selector and auto hide line where is input selector "Category".

Thanks

Re: bug_report_page.php and auto select project

Posted: 08 Jan 2019, 08:51
by cas
Within user managemnt you can only assign a default project. Perhaps you should look at using sub-projects rather than categories.

Re: bug_report_page.php and auto select project

Posted: 08 Jan 2019, 08:57
by atrol
Your link should work, e.g. this works for me to report an issue for category "feature" in project "mantisbt"
https://www.mantisbt.org/bugs/bug_repor ... oject_id=1

To hide the category see option $g_bug_report_page_fields https://www.mantisbt.org/docs/master/en ... fig.fields

Re: bug_report_page.php and auto select project

Posted: 08 Jan 2019, 09:33
by truefriend-cz
Ok, thanks i will testing. How i use g_bug_report_page_fields for hide category_id?
Yes, i know change config file but i dont know formated array. I use simple ON OFF swithes on one line.

I wanted on net and this solution is right? After add no accepted sorting and enabling disabling.

$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',
);


atrol wrote: 08 Jan 2019, 08:57 Your link should work, e.g. this works for me to report an issue for category "feature" in project "mantisbt"
https://www.mantisbt.org/bugs/bug_repor ... oject_id=1

To hide the category see option $g_bug_report_page_fields https://www.mantisbt.org/docs/master/en ... fig.fields

Re: bug_report_page.php and auto select project

Posted: 08 Jan 2019, 09:54
by atrol
Copy the deafult settings of $g_bug_report_page_fields from file config_defaults_inc.php to your config_inc.php and adjust it to your needs.

Re: bug_report_page.php and auto select project

Posted: 08 Jan 2019, 10:18
by truefriend-cz
atrol wrote: 08 Jan 2019, 09:54 Copy the deafult settings of $g_bug_report_page_fields from file config_defaults_inc.php to your config_inc.php and adjust it to your needs.
Thank you very much. I did not know there was next configuration file in the base folder :D

Re: bug_report_page.php and auto select project

Posted: 08 Jan 2019, 10:58
by atrol
truefriend-cz wrote: 08 Jan 2019, 10:18 I did not know there was next configuration file in the base folder :D
config_defaults_inc.php is not meant as a configuration file that should be changed by user.
Never ever change it, as you might get problems when upgarding Mantis.
All configuration should be done in config_inc.php and/or the web UI.