bug_report_page.php and auto select project

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
truefriend-cz
Posts: 66
Joined: 08 Jan 2019, 07:14

bug_report_page.php and auto select project

Post 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
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: bug_report_page.php and auto select project

Post by cas »

Within user managemnt you can only assign a default project. Perhaps you should look at using sub-projects rather than categories.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: bug_report_page.php and auto select project

Post 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
Please use Search before posting and read the Manual
truefriend-cz
Posts: 66
Joined: 08 Jan 2019, 07:14

Re: bug_report_page.php and auto select project

Post 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
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: bug_report_page.php and auto select project

Post 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.
Please use Search before posting and read the Manual
truefriend-cz
Posts: 66
Joined: 08 Jan 2019, 07:14

Re: bug_report_page.php and auto select project

Post 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
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: bug_report_page.php and auto select project

Post 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.
Please use Search before posting and read the Manual
Post Reply