How to add a project in "Manage Projects"?

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
doug_stevens
Posts: 10
Joined: 10 Jul 2015, 16:34

How to add a project in "Manage Projects"?

Post 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.
Attachments
mantis_proj_mgt.png
mantis_proj_mgt.png (18.02 KiB) Viewed 12291 times
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

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

Post by atrol »

You must be logged in as a user with administrator privileges to be able to create projects.
Please use Search before posting and read the Manual
doug_stevens
Posts: 10
Joined: 10 Jul 2015, 16:34

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

Post 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.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

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

Post by atrol »

What is displayed on the top of the page? You should see something like "Logged in as YourName YourAccessLevel"
Please use Search before posting and read the Manual
doug_stevens
Posts: 10
Joined: 10 Jul 2015, 16:34

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

Post 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)
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

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

Post 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
Please use Search before posting and read the Manual
doug_stevens
Posts: 10
Joined: 10 Jul 2015, 16:34

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

Post 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
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

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

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