how to override status flow

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
ghas

how to override status flow

Post by ghas »

hi,

I have defined a set of statuses and a status flow. Everything works as expected - I can change statuses only according to the flow. However in some cases I would like the administrator to be able to change statuses differently, than defined in the flow.

Example: when someone changed a status by mistake, I'd like the administrator to undo this change and go back to previous status, but the status flow doesn't allow to do that.

I know admin can change statuses directly in database, but I'd like to avoid that.

Thanks for any ideas how to solve this.

Best regards :)
ghas

Re: how to override status flow

Post by ghas »

I managed to find a solution on my own:

I modified get_status_option_list function in print_api.php file. I changed the line

if( count( $t_enum_workflow ) < 1)

to

if( count( $t_enum_workflow ) < 1 || $p_user_auth == 90)

where "90" corresponds to administrator in my mantis instance. In your instance, this number may be different.
Lapinkiller
Posts: 408
Joined: 28 Jan 2011, 18:47
Location: France
Contact:

Re: how to override status flow

Post by Lapinkiller »

you should use constant and not "90" ;)
Lapinkiller,
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
Post Reply