Displaying Version field based on role
Posted: 06 Mar 2008, 16:12
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
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.
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;
}