Action Group Menu : Resolution & Multiple Workflow

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
Llyd09
Posts: 3
Joined: 13 Jun 2007, 09:57

Action Group Menu : Resolution & Multiple Workflow

Post by Llyd09 »

Hi all !

I'm customizing Mantis 1.0.7 and I need some help and advices :

- I'm currently changing the Action group menu (on the 'View all bugs' page) : I needed to remove somme actions (delete bugs and others) and did it pretty easily, but now I'd like to add the "Update resolution" action.

I added it to the menu, but i can't find where to add the function that would update Resolution. If you have any ideas on that...

***

- On a different subject, I added a multiple workflow, based on user's role (guest, developper, etc..) which basically works like this :

In bug_api.php

Code: Select all

function bug_check_workflow( $p_bug_status, $p_wanted_status ) {
		$t_user_access_level = current_user_get_access_level();
		
		if($t_user_access_level == '10'){
			$t_status_enum_workflow = config_get( 'status_enum_workflow_invit' );
		} else if ($t_user_access_level == '25'){
			$t_status_enum_workflow = config_get( 'status_enum_workflow_dev' );
		} else if ($t_user_access_level == '40'){
			$t_status_enum_workflow = config_get( 'status_enum_workflow_spec' );
		} else if ($t_user_access_level == '55'){
			$t_status_enum_workflow = config_get( 'status_enum_workflow_r7' );
		} else if ($t_user_access_level == '70'){
			$t_status_enum_workflow = config_get( 'status_enum_workflow_gest' );
		} else if ($t_user_access_level == '90'){
			$t_status_enum_workflow = config_get( 'status_enum_workflow_admin' );
		}
Quite dirty but it works. I'd like to know if i can export this in custom_function.php and if I need to change something to call it correctly ( maybe a 'require_once' or something ).

Any advices ?

Thanks.
julie
Posts: 1
Joined: 27 Apr 2011, 12:48

Re: Action Group Menu : Resolution & Multiple Workflow

Post by julie »

Hello,
I came across the same problem.
I know where the code should be added, but I am not good at PHP to write the correct code.
In "bug_actiongroup.php" file
exists the cycle "foreach( $f_bug_arr as $t_bug_id ) {" you can see the "switch ( $f_action ) {" structure.
in this part a new "Case" should be written for updating the resolution.

Assume should be something like "case 'UP_STATUS':"

Thanks in advance.
Post Reply