제품 버전을 추가하여 사용하다 보니 추가된 시간대로 정렬이 되어 보기 좋지 않다.
버전별로 소팅하기 위해 설정값들을 찾아보았으나 없었다.
결국 쿼리문을 수정하여 해결.
core/version_api.php 파일에 'ORDER BY'로 검색하여 date_order 로 되어 있는 것을 'version'으로 모두 변경.
(주의) 다음 부분은 수정하면 안된다. Roadmap 에서 Error가 발생한다.
$query = "SELECT *
FROM $t_project_version_table
WHERE project_id IN (" . implode( ',', $c_project_id_array ) . ')
ORDER BY date_order DESC';
다음 부분을 수정한다. (Version 1.2.1 기준)
1.
$query = "SELECT *
FROM $t_project_version_table
WHERE $t_project_where";$query_params = array();
if( $p_released !== null ) {
$c_released = db_prepare_int( $p_released );
$query .= " AND released = " . db_param( $t_param_count++ );
$query_params[] = $c_released;
}if( $p_obsolete !== null ) {
$c_obsolete = db_prepare_bool( $p_obsolete );
$query .= " AND obsolete = " . db_param( $t_param_count++ );
$query_params[] = $c_obsolete;
}/**********************************************************************************************************
* Modified for sort by version naming FROM Kim Jung Hun. 2010.06.30
*
$query .= " ORDER BY date_order DESC";
*/
$query .= " ORDER BY version DESC";
2.
/**********************************************************************************************************
* Modified for sort by version naming FROM Kim Jung Hun. 2010.06.30
*
$query = "SELECT *
FROM $t_project_version_table
WHERE $t_project_where $t_released_where $t_obsolete_where
ORDER BY date_order DESC";
*/
$query = "SELECT *
FROM $t_project_version_table
WHERE $t_project_where $t_released_where $t_obsolete_where
ORDER BY version DESC";
다음은 관련 DB data
mysql> select * from mantis_project_version_table;
+----+------------+---------+-------------+----------+----------+------------+
| id | project_id | version | description | released | obsolete | date_order |
+----+------------+---------+-------------+----------+----------+------------+
| 4 | 1 | 1.3 | | 0 | 0 | 1275306450 |
| 5 | 1 | 1.4 | | 0 | 0 | 1275306462 |
| 6 | 1 | 5.0.2 | | 0 | 0 | 1275306480 |
| 7 | 1 | 5.0.3 | | 0 | 0 | 1275306480 |
+----+------------+---------+-------------+----------+----------+------------+
4 rows in set (0.00 sec)
'Engineering > __01. Issue Tracking' 카테고리의 다른 글
[Mantis] 모든 이슈 감시하기 (0) | 2014.12.22 |
---|---|
[Mantis] 여러 이슈를 한번에 버전 변경하기 (print_all_bug_action_option_list() 에 product version 추가하기) (0) | 2014.12.21 |
[Mantis] 이슈 보기(view_all_bug_page)에서 특정 필드를 특정 사용자만 보기 (0) | 2014.11.25 |
[Mantis] CSV Export 한글 깨짐 (0) | 2014.11.25 |
[Mantis] 계정 관리 페이지(manager_user_page.php) 에서 실명으로 기본 정렬하기 (0) | 2014.11.10 |