Page 1 of 1

How to add a project in "Manage Projects"?

Posted: 10 Jul 2015, 16:52
by doug_stevens
I need to add another project to my mantis setup, but the "Manage Projects" screen differs from what's shown in
https://maestrano.com/knowledge_center/ ... et-started "4 - Creating and Managing projects and categories in Mantis"
Specifically, the "Create new project" button to the right of the "Projects" label in the tutorial page is missing in my page (see mantis_proj_mgt.png, attached).

Do I need to change something in a config file somewhere?
Thanks for any pointers.

Re: How to add a project in "Manage Projects"?

Posted: 10 Jul 2015, 19:27
by atrol
You must be logged in as a user with administrator privileges to be able to create projects.

Re: How to add a project in "Manage Projects"?

Posted: 15 Jul 2015, 05:44
by doug_stevens
atrol wrote:You must be logged in as a user with administrator privileges to be able to create projects.
manage_proj_edit_page.php shows "Access Level" as "Administrator" for my user name.

Re: How to add a project in "Manage Projects"?

Posted: 15 Jul 2015, 06:00
by atrol
What is displayed on the top of the page? You should see something like "Logged in as YourName YourAccessLevel"

Re: How to add a project in "Manage Projects"?

Posted: 15 Jul 2015, 19:15
by doug_stevens
atrol wrote:What is displayed on the top of the page? You should see something like "Logged in as YourName YourAccessLevel"
It shows as
Logged in as: <my user name> (<my real name> - administrator)

Re: How to add a project in "Manage Projects"?

Posted: 15 Jul 2015, 19:22
by atrol
I was not able to reproduce your problem with a fresh install of the latest stable MantisBT release (1.2.19 at the moment).

If you are running an older version, I recommend that you upgrade to the latest (download from [1]). If after doing so the problem persists, provide detailed step-by-step instructions to reproduce the issue; the following additional information may also be useful:

- Exact version of MantisBT, PHP, Database, Web server, Browser and Operating System
- Relevant customizations (e.g. changes in config_inc.php, etc)
- Installed plugins or custom functions ?
- Was the MantisBT source code modified in any way ?

[1] http://mantisbt.org/download.php

Re: How to add a project in "Manage Projects"?

Posted: 09 Jun 2017, 16:46
by doug_stevens
I finally got around to analyzing the code. I was running as myself, and the page showed me as "Logged in as: xxxxx (Xxxx Xxxxxxx - administrator)". In manage_proj_page.php, the code adds the button only if the user's global access level is create_project_threshold or higher. The var $g_create_project_threshold was initialized to ADMINISTRATOR, which is defined as 90 in core/constant_inc.php.

In the dbase, mantis_user_table had me at access_level 55; I changed that to 90, and the "Create New Project" button appeared. Apparently the code determining the "Logged in as administrator" label uses a lower access level than 90.

I tried creating a new user at admin level, and it created with access_level 90. I think the problem was that I created my own account under an older version, and it maybe defined ADMINISTRATOR as 55 instead. The work-around is ...

Code: Select all

update mantis_user_table set access_level=90 where access_level=55;
PS From manage_overview_page.php ...
MantisBT Version 1.2.19
Schema Version 183

Re: How to add a project in "Manage Projects"?

Posted: 10 Jun 2017, 19:45
by atrol
Good to hear, hat you finally managed to solve the issue.
doug_stevens wrote:I think the problem was that I created my own account under an older version, and it maybe defined ADMINISTRATOR as 55 instead.
Certainly not, it was always 90 even if I look at oldest code which is still available from 2003
https://github.com/mantisbt/mantisbt/bl ... nc.php#L39

I am pretty sure the problem was, that you have not been a global administrator, but just administrator for the project you had selected.
Your global access level was 55 = DEVELOPER.
You would have seen it, if you had chosen "All Projects" in the project select box.
doug_stevens wrote:

Code: Select all

update mantis_user_table set access_level=90 where access_level=55;
Be aware that all developers are now administrators after this change.