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
bug_report_page.php and auto select project
Moderators: Developer, Contributor
-
- Posts: 66
- Joined: 08 Jan 2019, 07:14
bug_report_page.php and auto select project
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
Re: bug_report_page.php and auto select project
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
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
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
-
- Posts: 66
- Joined: 08 Jan 2019, 07:14
Re: bug_report_page.php and auto select project
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',
);
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
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
Re: bug_report_page.php and auto select project
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.
-
- Posts: 66
- Joined: 08 Jan 2019, 07:14
Re: bug_report_page.php and auto select project
Thank you very much. I did not know there was next configuration file in the base folder
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
Re: bug_report_page.php and auto select project
config_defaults_inc.php is not meant as a configuration file that should be changed by user.truefriend-cz wrote: ↑08 Jan 2019, 10:18 I did not know there was next configuration file in the base folder
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.