Displaying Version field based on role

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
qvii
Posts: 4
Joined: 04 Mar 2008, 21:38

Displaying Version field based on role

Post by qvii »

My very first customization....

In our process, we allow many different people to log issues against our products (sales reps, service, developers, customer service, managers, etc...) however not each role has access to all of the versions that are created. For example if we have version 1.0, 1.1 and 1.2 but version 1.2 is not marked "release" I don't want certain role types (viewer, reporter, updater) to write issues against, but I do want other types (developer, manager, administrator) to have the ability.

So my fix:
Mantis 1.1.1
File: print_api.php
Function: print_version_option_list
Line: ~820 add the following

Code: Select all

    if (access_has_project_level(DEVELOPER)) {
      $p_released = VERSION_ALL;
    }  
The function "print_version_option_list( $f_product_version, $t_project_id, VERSION_RELEASED )" is called from bug_report_page.php to only displayed versions that are marked as released. My code checks to see if the current user is at least a DEVELOPER, if so then forces to show all versions.
vboctor
Site Admin
Posts: 1293
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Re: Displaying Version field based on role

Post by vboctor »

Check the following thread out:
http://www.mantisbt.org/forums/viewtopi ... 30&p=11608

I suggest you submit a feature request in the bug tracker and refer to both forum threads.
Migrate your MantisBT to the MantisHub Cloud
qvii
Posts: 4
Joined: 04 Mar 2008, 21:38

Re: Displaying Version field based on role

Post by qvii »

Post Reply