How to add a project in "Manage Projects"?

General discussion of Mantis.

Moderators: Contributor, Developer

How to add a project in "Manage Projects"?

Postby doug_stevens » Jul 10, 2015 11:52 am

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/pages/34-mantis-bt-tutorial-get-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 6337 times
doug_stevens
 
Posts: 10
Joined: Jul 10, 2015 11:34 am

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

Postby atrol » Jul 10, 2015 2:27 pm

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 6710
Joined: Mar 26, 2008 4:37 pm
Location: Germany

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

Postby doug_stevens » Jul 15, 2015 12:44 am

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.
doug_stevens
 
Posts: 10
Joined: Jul 10, 2015 11:34 am

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

Postby atrol » Jul 15, 2015 1:00 am

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 6710
Joined: Mar 26, 2008 4:37 pm
Location: Germany

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

Postby doug_stevens » Jul 15, 2015 2:15 pm

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)
doug_stevens
 
Posts: 10
Joined: Jul 10, 2015 11:34 am

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

Postby atrol » Jul 15, 2015 2:22 pm

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 6710
Joined: Mar 26, 2008 4:37 pm
Location: Germany

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

Postby doug_stevens » Jun 09, 2017 11:46 am

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
doug_stevens
 
Posts: 10
Joined: Jul 10, 2015 11:34 am

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

Postby atrol » Jun 10, 2017 2:45 pm

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 6710
Joined: Mar 26, 2008 4:37 pm
Location: Germany


Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests