How to get the project name?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
EBAH
Posts: 5
Joined: 25 Mar 2011, 15:56

How to get the project name?

Post by EBAH »

Hi all,
with the following code I can obtain the ID of current project:

Code: Select all

$prj_id=helper_get_current_project();
But how can I do if I want the name (appearing in the top-right dropdown menu) of the project?

Is there a ready function or should I connect to database?

Code: Select all

$query  = "select name FROM mantis_project_table where id=".$prj_id." LIMIT 1,1";
Thanks for your support.

Evan
EBAH
Posts: 5
Joined: 25 Mar 2011, 15:56

Re: How to get the project name?

Post by EBAH »

Sorry guys didn't realized that my previous post was answered!!!
You can use project_get_name ( $project_id )
Thanks to everybody,
Evan
karatros
Posts: 2
Joined: 03 Jun 2011, 20:31

Re: How to get the project name?

Post by karatros »

I want to do the same thing but using the WebService. Is there any way to do it?
karatros
Posts: 2
Joined: 03 Jun 2011, 20:31

Re: How to get the project name?

Post by karatros »

Auto-answer.

We can use the method called "mc_get_user_accesible_projects" to obtain all the projects that a user can use.
Post Reply