Sort Assigned to Me (Unresolved) in My View

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
wutsdis
Posts: 4
Joined: 22 Aug 2019, 13:44

Sort Assigned to Me (Unresolved) in My View

Post by wutsdis »

We have a very useful mod that sorts your assigned issues by always putting the ones with higher priority on the top. Our mantis is extremely old (version 1.1.0) and I'm wondering how could this be achieved in the latest version?
We have changed the sorting by adding

'sort' => 'priority',

in my_view_inc.php like this:

Code: Select all

	$c_filter['assigned'] = array(
		'sort'			=> 'priority',
		'show_category'		=> Array ( '0' => META_FILTER_ANY ),
		'show_severity'		=> Array ( '0' => META_FILTER_ANY ),
		'show_status'		=> Array ( '0' => META_FILTER_ANY ),
		'highlight_changed'	=> $t_default_show_changed,
		'reporter_id'		=> Array ( '0' => META_FILTER_ANY ),
		'handler_id'		=> Array ( '0' => $t_current_user_id ),
		'show_resolution'	=> Array ( '0' => META_FILTER_ANY ),
		'show_build'		=> Array ( '0' => META_FILTER_ANY ),
		'show_version'		=> Array ( '0' => META_FILTER_ANY ),
		'hide_status'		=> Array ( '0' => $t_bug_resolved_status_threshold ),
		'user_monitor'		=> Array ( '0' => META_FILTER_ANY )
	);
In the latest mantis version, I've found the sorting function filter_create_assigned_to_unresolved in the filter_api.php but I have no clue if the desired result could be achieved. Any ideas?


Edit:
To do this in the newer versions 2.xx.xx add

$c_filter['assigned']['sort'] = 'priority';

in my_view_inc.php like this:

Code: Select all

$c_filter['assigned'] = filter_create_assigned_to_unresolved( helper_get_current_project(), $t_current_user_id );
$c_filter['assigned']['sort'] = 'priority';
Post Reply