Missing accounts from config page

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

Moderators: Developer, Contributor

Post Reply
orajala
Posts: 6
Joined: 27 Mar 2015, 10:54

Missing accounts from config page

Post by orajala »

Hi,
For some reason we have only small amount of our accounts visible in "The default / fallback reporter user for issues created by email " -drop down menu in the manage_config -page. And naturally also the Mail Reporter-account created by this plugin is missing...

And all our users are at least reporters, so that is not the case. There seems not to be any pattern, there are some managers, some developers and some reporters in that list.

Mantis version is 1.2.15 and EmailReporting is 0.9.0-DEV downloaded yesterday.

Any ideas what could cause this and especially how to solve it?

Best regards,
-Olli Rajala
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Missing accounts from config page

Post by SL-Gundam »

Its supposed to show a list of all users who have a global reporter access level. So users with only project access levels will not be shown

But i have found a small issue with this. During installation of EmailReporting the mail reporter is created using the REPORTER constant for the access level while when the dropdown list is generated the global configuration option "report_bug_threshold" is used. This could be an issue if you changed the default value of "report_bug_threshold".

This has now been corrected: https://github.com/mantisbt-plugins/Ema ... fbab59f7b4

Don't know if this will fix your issue but you can recreate the Mail reporter user by
1. deleting the configuration option "plugin_EmailReporting_mail_reporter_id" from the "Manage Configuration" page (http://your.website.com/mantisbt/adm_config_report.php)
2. uninstalling and installing the plugin again. (just click uninstall and install on the "Manage plugin page")
orajala
Posts: 6
Joined: 27 Mar 2015, 10:54

Re: Missing accounts from config page

Post by orajala »

Hello,
According to your description this wasn't related to our problem. But, I upgraded our plugin-installation with code downloaded today and the problem disappeared.

So, case closed, even though the real reason is not known. These cases are a bit annoying...

-Olli Rajala
orajala
Posts: 6
Joined: 27 Mar 2015, 10:54

Re: Missing accounts from config page

Post by orajala »

Sorry, I was wrong. After a while the problem appeared again and the list includes again only a small part of our users, and of course the Mail Reporter -user is missing.

So, all users have global reporter rights. I haven't made any changes to any user right things after upgrading the plugin today.

report_bug_threshold in all projects/all users is set to 25, but we have set it to some other value in many projects. Not configured explicitly to the email test project I created for testing this, so the default 25 is used.

I also tried the uninstall/install procedure you suggested but no luck. And I had deleted the provided configuration value before reinstalling the plugin.

Any other ideas how to do further debugging?

-Olli Rajala
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Missing accounts from config page

Post by SL-Gundam »

I wasn't sure the fix was applicable to your issue... but it could have been.

Anyways lets continue

Are you using any other plugins besides EmailReporting?
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Missing accounts from config page

Post by SL-Gundam »

I've been through the MantisBT code for the functions that generate this list. I can't understand how this could happen. Especially since youre telling me it was gone for a little while but came back without any proper reason for this.

The only thing i can think of further (unless the earlier question about other plugins nets any results) is to either let me look at your MantisBT installation to debug the code or if you send me the database + MantisBT folder so that i can debug it on my own server.
orajala
Posts: 6
Joined: 27 Mar 2015, 10:54

Re: Missing accounts from config page

Post by orajala »

Hi,
Regarding plugins, we have: Import/Export issues 1.0, Mantis Graphs 1.0, MantisBT Formatting 1.0a.

Unfortunately I can't give you any db or code dump, but have you checked the code of Mantis 1.2.15 regarding this?

When poking around, it seems that this plugin is not getting accounts from all projects and all subprojects when using this:

function print_user_option_list( $p_user_id, $p_project_id = null, $p_access = ANYBODY )

We may be far off with these thoughts, but for some reason for example the Mail Reporter user becomes visible when added with reporter rights to some main project. But if added to some subproject with reporter rights it doesn't become visible. So, the list is not populated with all users with at least global reporter rights, but with all users who have at least reporter rights to our main projects.

- Olli Rajala
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Missing accounts from config page

Post by SL-Gundam »

I checked 1.2.15 specifically yes.

Your plugins are normal plugins so they should not cause anything like this.

I was kinda expecting you would say no to the db/code dump but had to try

Any chance you can upgrade to the latest stable build of MantisBT? The weird thing is that this is part of MantisBT core functionality so its unlikely EmailReporting has a bug in this part... but who knows, i have been known to be wrong 8O
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Missing accounts from config page

Post by SL-Gundam »

I think i've found the issue

If a user has a global access level below "report_bug_threshold" (Capability "Report an issue" for "Workflow Thresholds") (default setting: REPORTER) and only in sub projects has an access level equal to or above "report_bug_threshold" -> That user will not be shown. Sub projects are apparently not traversed by the function used here.

Another method how a user might be invisible is if you have set "report_bug_threshold" to for example REPORTER but all project specific "Workflow Thresholds" require access levels higher then that. This would result in a user that cannot report any issues while the global access level would suggest it could.

Either way i suggest you increase the access level of the "Mail Reporter" user so that it has appropriate access to your projects
I would also suggest revising the project level settings since this could cause problems if EmailReporting is allowed to create new user accounts for non-existing users. These new user accounts might get access levels which would conflict with the reported issues. They might not even be able to see them if you combine a certain set of options.

I have changed EmailReporting to show all users in the dropdown list, even those who do not have any REPORTER access rights. The idea of a user missing and as a result causing an unintended change in the configuration option is not an option
https://github.com/mantisbt-plugins/Ema ... f2f7bd1548

Updating MantisBT to the latest version will not fix this.

Hopefully this will your issues
Post Reply