View Issue Details

IDProjectCategoryView StatusLast Update
0007947mantisbtroadmappublic2007-08-02 02:28
Reporterbriggsal Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.1.0a3 
Fixed in Version1.1.0a4 
Summary0007947: when bulk assigning target version I get permission messages
Description

When I bulk assign certain issues I get an error message : You did not have appropriate permissions to perform that action on the following issues.

I have no idea why as I am administrator - but it means I haev to go into each and manually change - where apparently my permissions are good enough!

Additional Information

The issues are in a sub project - this might help.

TagsNo tags attached.

Relationships

has duplicate 0007852 closedvboctor Batch updates of Target Version always fails 
has duplicate 0008175 closedgiallu You did not have appropriate permissions to perform that action for Administrator of project 

Activities

ave

ave

2007-05-21 06:13

reporter   ~0014572

I think the cause of the problem is in the function access_get_status_threshold() defined in the 'core/access_api.php' which is called from line 116 of bug_actiongroup.php.
The function checks the value of 'set_status_threshold' configuration option, but the value does not have an entry for '10' (= new) for some reason. As a result, it returns the value of 'update_bug_status_threshold' when the status of the bug is 'new'.

--
0006390 may be related to this issue.

briggsal

briggsal

2007-05-22 03:13

reporter   ~0014586

I have tried this morning with a set of issues that were in the status of assigned and got the same error message so I don't think that the diagnosis is correct.

ave

ave

2007-05-22 09:59

reporter   ~0014592

Hi briggsal,

Currently, bulk assigning requires an assignee to have privilege to (1) change bug status to 'assigned' or (2) update bug status if the current status is 'new'.
Assuming the assignee is a developer of your project, to give developers these privilege would solve your problem I suppose.
(1) is in the 'ACCESSS LEVELS' section in the [Manage] -> [Manage Configuration] -> [Workflow Transitions].
(2) is the 'Update issue status' in the [Manage] -> [Manage Configuration] -> [Workflow Thresholds].

--
To fix the inconsistency between bulk and single assigning, remove the line 116 and 117 of 'bug_actiongroup.php'.
$t_threshold = access_get_status_threshold( $t_assign_status, bug_get_field( $t_bug_id, 'project_id' ) );
if ( access_has_bug_level( $t_threshold , $t_bug_id, $f_assign ) &&
And insert the line below instead.
if ( access_has_bug_level( config_get( 'handle_bug_threshold' ) , $t_bug_id, $f_assign ) &&

Though I believe the change is valid, you should wait until someone in the dev team admits it.

briggsal

briggsal

2007-05-22 11:49

reporter   ~0014594

Unfortunately as stated in the original issue - I am logged in as an administrator with all privileges - still doesn't work.

As you suggest I will wait for someone to approve those code changes.

Annoying I swiftly performed this upgrade to get the bulk update facility - which is not working still.

ave

ave

2007-05-22 13:21

reporter   ~0014596

It looks like we are talking about different matter...

The bulk assigning feature existed at least in version 1.0.0.
I also noticed that the error message you reported is not the one raised by bulk assigning.
I guess what you are trying to do is updating 'fixed in version' or 'target version' for multiple issues, right?

If I am wrong, tell me exactly what you did step by step.

ave

ave

2007-05-22 13:31

reporter   ~0014597

Oops...sorry, it was in the summary of the issue.
Please ignore my comments, and sorry for wasting your time.

I will look into the REAL issue, later.

ave

ave

2007-05-22 14:37

reporter   ~0014599

At line 199 and 214 of bug_actiongroup.php, it seems to check version or something.

if ( version_exists( $t_project_id, $f_version ) ) {

But here's the actual definition of the function.

function version_exists( $p_version_id ) {
return version_cache_row( $p_version_id, false ) !== false;
}

As a result, it executes a query "SELECT * FROM mantis_project_version_table WHERE id='X'" with project id as X.

It doesn't make sense to me, but, as you can see, I am almost blind tonight.
Hope someone will cover this up.
0007852 is a duplicate.

ave

ave

2007-05-23 07:26

reporter   ~0014608

Replacing the line 199 and 214 of bug_actiongroup.php will fix the problem.

Current:
if ( version_exists( $t_project_id, $f_version ) ) {

Replace with:
if ( version_get_id( $f_fixed_in_version, $t_project_id ) ) {

I guess it would be the intent of the original author, the error message for the validation seems to be a little bit misleading though.

briggsal

briggsal

2007-06-19 11:57

reporter   ~0014772

yes that fixes the problem