Page 1 of 1

Assign To - User is not able to see issue

Posted: 03 Jun 2011, 13:48
by udo
Hello,

I have a custom workflow in place: New > Assigned > In Progress > Retest > Resolved > Closed

At the moment the issue has status "In Progress". I have assigned it to an user of level "reporter". He is not able to see the issue...

Do I have to configure this somewhere?

Thanks, Udo

Re: Assign To - User is not able to see issue

Posted: 03 Jun 2011, 14:16
by istvanb
Do you use private issues? If so then check your $g_private_bug_threshold variable, it must be

$g_private_bug_threshold = REPORTER;

Re: Assign To - User is not able to see issue

Posted: 03 Jun 2011, 14:57
by udo
yep, I'm using $g_default_bug_view_status = VS_PRIVATE;

unfortunately setting $g_private_bug_threshold = REPORTER; is not enough.

I also have $g_limit_reporters = ON and had to set it to $g_limit_reporters = OFF but then reporters see every issue... which is confusing for them.

any suggestions to make this work?

thanks, udo

Re: Assign To - User is not able to see issue

Posted: 07 Jun 2011, 15:22
by udo
any news regarding this? thanks, udo

Re: Assign To - User is not able to see issue

Posted: 07 Jun 2011, 15:55
by istvanb
I am afraid that a issue can not be resolved. As far as I know the current mantis version does not support this type of exceptions, so either you allow the reporters to see private issues, or you can not assign issues to them.

Re: Assign To - User is not able to see issue

Posted: 08 Jun 2011, 14:18
by AlainD.
The check of limit_reporters has the priority on the private status check:

Code: Select all

function access_has_bug_level( $p_access_level, $p_bug_id, $p_user_id = null ) {
(...)
	# check limit_Reporter (Issue #4769)
	# reporters can view just issues they reported
	$t_limit_reporters = config_get( 'limit_reporters' );
	if(( ON === $t_limit_reporters ) && ( !bug_is_user_reporter( $p_bug_id, $p_user_id ) ) && ( !access_has_project_level( REPORTER + 1, $t_project_id, $p_user_id ) ) ) {
		return false;
	}

	# If the bug is private and the user is not the reporter, then the
	#  the user must also have higher access than private_bug_threshold
	if( VS_PRIVATE == bug_get_field( $p_bug_id, 'view_state' ) && !bug_is_user_reporter( $p_bug_id, $p_user_id ) ) {
(...)
It means that if you set $g_limit_reporters = ON, then all reporters will see at most they reported issues, and only them. Not the other ones assigned to them.

Re: Assign To - User is not able to see issue

Posted: 08 Jun 2011, 15:47
by udo
thank you Alain. much clearer now.

could you also please include the php file name?

do you know the "assigned to" variable? I'm thinking of extending this functionality for my installation... (note: I would suggest this as a general functionality)

thanks, udo

Re: Assign To - User is not able to see issue

Posted: 08 Jun 2011, 18:02
by AlainD.
Well, for your information, you must know that almost all the functions in Mantis named as foo_something_else are located in the file foo_api.php under the subfolder "core".
So here since the function name starts by access I think it's in the file core/access_api.php

Second, I don't understand what you're talking about with the "assigned to" variable.

Re: Assign To - User is not able to see issue

Posted: 08 Jun 2011, 18:46
by udo
what I ment is the variable that contains the username of the user which has the issue currently assigned. it's the "Assigned To" field of an issue.

Re: Assign To - User is not able to see issue

Posted: 08 Jun 2011, 19:15
by AlainD.
Hummm ok. Well if I remember correctly it should be the value of the column 'handler_id' of the mantis_bug_table for your bug id.