How to select the project?

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
Lisandro1987
Posts: 19
Joined: 02 Oct 2012, 13:56

How to select the project?

Post by Lisandro1987 »

When I create an automatic bug from an email, it's always choose the first project of all projects list, although the user does not have permissions on it. How I select/choose the project?
Last edited by Lisandro1987 on 09 Nov 2012, 14:56, edited 2 times in total.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: How to select the project?

Post by SL-Gundam »

Check the mailbox configuration. It should specify a project and a category to be used
Lisandro1987
Posts: 19
Joined: 02 Oct 2012, 13:56

Re: How to select the project?

Post by Lisandro1987 »

Thanks so much! :)
Lisandro1987
Posts: 19
Joined: 02 Oct 2012, 13:56

Re: How to select the project?

Post by Lisandro1987 »

If when I create a bug with a email I want to select the project_id using a SQL consult (based on the user_id). So I check in 'mail.api.php' the function 'add_bug' the variable '$t_bug_data->project_id'...

Now I want to get the user_id from the user who send the email. Which is that variable? How I get it?
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: How to select the project?

Post by SL-Gundam »

I suggest you take a look at the "get_user" function so that you understand how the reporting user is retrieved

After that you should probably start editing the line below the line you stated with the project id. Thats the line that sets the reporter of the issue
Post Reply