diff -urN mantis.orig/api/soap/mantisconnect.wsdl mantis/api/soap/mantisconnect.wsdl --- mantis.orig/api/soap/mantisconnect.wsdl 2015-01-25 18:00:30.000000000 -0500 +++ mantis/api/soap/mantisconnect.wsdl 2015-10-25 16:34:05.000000000 -0400 @@ -738,6 +738,13 @@ + + + + + + + @@ -1089,6 +1096,11 @@ + + Get the count of issues that match the specified filter. + + + Get the issue headers that match the specified filter and paging details. Pass "-1" for the per_page parameter to get all issues. @@ -1427,6 +1439,11 @@ + + + + + diff -urN mantis.orig/api/soap/mc_filter_api.php mantis/api/soap/mc_filter_api.php --- mantis.orig/api/soap/mc_filter_api.php 2015-01-25 18:00:30.000000000 -0500 +++ mantis/api/soap/mc_filter_api.php 2015-10-25 16:38:23.000000000 -0400 @@ -84,6 +84,46 @@ } /** + * Get count of issues matching the specified filter. + * + * @param string $p_username The name of the user trying to access the filters. + * @param string $p_password The password of the user. + * @param integer $p_project_id The id of the project to retrieve filters for. + * @param integer $p_filter_id The id of the filter to apply. + * @return Array that represents an IssueDataArray structure + */ +function mc_filter_get_issue_count( $p_username, $p_password, $p_project_id, $p_filter_id) { + $t_user_id = mci_check_login( $p_username, $p_password ); + if( $t_user_id === false ) { + return mci_soap_fault_login_failed(); + } + $t_lang = mci_get_user_lang( $t_user_id ); + + if( !mci_has_readonly_access( $t_user_id, $p_project_id ) ) { + return mci_soap_fault_access_denied( $t_user_id ); + } + + $p_page_number = 0; + $p_per_page = -1; + + $t_orig_page_number = $p_page_number < 1 ? 1 : $p_page_number; + $t_page_count = 0; + $t_bug_count = 0; + $t_filter = filter_db_get_filter( $p_filter_id ); + $t_filter_detail = explode( '#', $t_filter, 2 ); + if( !isset( $t_filter_detail[1] ) ) { + return SoapObjectsFactory::newSoapFault( 'Server', 'Invalid Filter' ); + } + $t_filter = unserialize( $t_filter_detail[1] ); + $t_filter = filter_ensure_valid_filter( $t_filter ); + + $t_result = array(); + $t_rows = filter_get_bug_rows( $p_page_number, $p_per_page, $t_page_count, $t_bug_count, $t_filter, $p_project_id ); + + return $t_bug_count; +} + +/** * Get the issue headers that match the specified filter and paging details. * * @param string $p_username The name of the user trying to access the filters.