Bug Notes not being set private

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

Moderators: Developer, Contributor

Post Reply
joelgb
Posts: 8
Joined: 30 Sep 2014, 20:35

Bug Notes not being set private

Post by joelgb »

Hello,
We have some users (developers) set in Mantis when they create a bugnote it is private by default. This works in the Mantis web interface.
If they send an email to create a bugnote in Mantis thru EmailReporting, the user is correctly identified by their email address & the note is created, but it is create as a public note, not private.

Do we have a misconfiguration somewhere?
Is this not a current feature? If no, could it be added?
We don't want all EmailReporting notes to be private, just for users that have defaulted their notes to private.

To default to private bugnotes per user, we do this:
In Mantis from an admin account -> Manage -> Manage Configuration -> Configuration Report

Add to a new user: Scroll to the bottom and use the "Create Configuration Option"
Select the target user from the "Username" drop-down, then set the option "default_bugnote_view_status" as Type = "Integer" with Value = "50"

We are using Mantis 2.26.2 & Email Reporting 0.10.1

Thank you for any information and help,
Joel
SL-Gundam
Posts: 754
Joined: 06 Jul 2011, 14:17

Re: Bug Notes not being set private

Post by SL-Gundam »

EmailReporting retrieves its default from the configuration options.
In theory this should work. In the past there were some issues with per project settings but that should be mostly resolved.
It was never tested with per user configuration options. It might be that needs some work.
SL-Gundam
Posts: 754
Joined: 06 Jul 2011, 14:17

Re: Bug Notes not being set private

Post by SL-Gundam »

My first advise would be to download EmailReporting 0.11.0-DEV from github and test again.
If it still happens let me know
joelgb
Posts: 8
Joined: 30 Sep 2014, 20:35

Re: Bug Notes not being set private

Post by joelgb »

Hi SL-Gundam,
Thank you for replying!

We updated to the latest 0.11.0-DEV from github and tested again, but the results are the same. A user who has default_bugnote_view_status set to 50 to make their note private replied to a ticket and their note was public. We tried setting default_bugnote_view for that user both at the "All Projects level as well as the single named project we have - we only have 1)

It seems this value is not applied for adding notes notes?

Thank you,
Joel
SL-Gundam
Posts: 754
Joined: 06 Jul 2011, 14:17

Re: Bug Notes not being set private

Post by SL-Gundam »

Found the problem. It has to do with the caching MantisBT does.

Please do the following.
Add the code below here: https://github.com/mantisbt-plugins/Ema ... i.php#L813

Code: Select all

unset( $GLOBALS[ 'g_cache_config_user' ] );
It will be included in EmailReporting but i've got some other commits that need further testing so need to wait on that.
joelgb
Posts: 8
Joined: 30 Sep 2014, 20:35

Re: Bug Notes not being set private

Post by joelgb »

Hi SL-Gundam.

THANK YOU!!!!!!!!!!!!!!!!!!

It works as desired/expected with the change you provided.

Seriously, thank you for the quick responses and the quick fix.

-Joel
Post Reply