View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012991 | mantisbt | api soap | public | 2011-05-11 07:27 | 2013-04-06 08:22 |
Reporter | rombert | Assigned To | rombert | ||
Priority | high | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Target Version | 1.2.6 | Fixed in Version | 1.2.6 | ||
Summary | 0012991: mc_filter_get_issues returns incorrect results for page_number > page_count | ||||
Description | (Stemming from a discussion at http://jira.codehaus.org/browse/SONARPLUGINS-1163 ) The filter API assumes that if the requested page number is larger than the last page number, the request page number becomes the last page number. This means that if I request page 4 for a filter which has 2 pages, I will get the second page. For the SOAP API this means that if a filter returns a number of issues which divides with the request issues per page, the last page will forever loop at the maximum number of rows. E.g.:
When page 0000004 is requested, there will be 100 issues. When page 0000005 -> infinity are requested, those same issues will be returned, and the client will never break out of the loop. The SOAP API code needs to be adjusted to return zero, rather than the last page's issues when the page number is out of bounds. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
I also discovered this scenario. Is it possible to retrieve the number of pages available? |
|
It's not possible right now to retrieve the number of pages, but there is a feature request for that ( bug 0008656 ). Unfortunately it needs a breaking change to the WSDL to be done right so it's likely going to be 1.3.x only. |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master 7b763277 2011-05-19 17:19 Details Diff |
SOAP API: Return an empty result when the page is outside the filter Rather than return the last page when an out of bounds page is requested, return no issues. This allows clients to find out when there are no more issues for a specific filter. Fixes 0012991 : mc_filter_get_issues returns incorrect results for page_number > page_count |
Affected Issues 0012991 |
|
mod - api/soap/mc_filter_api.php | Diff File | ||
mod - tests/soap/FilterTest.php | Diff File | ||
mod - api/soap/mc_project_api.php | Diff File | ||
MantisBT: master-1.2.x c70ff523 2011-05-19 17:19 Details Diff |
SOAP API: Return an empty result when the page is outside the filter Rather than return the last page when an out of bounds page is requested, return no issues. This allows clients to find out when there are no more issues for a specific filter. Fixes 0012991 : mc_filter_get_issues returns incorrect results for page_number > page_count |
Affected Issues 0012991 |
|
mod - tests/soap/FilterTest.php | Diff File | ||
mod - api/soap/mc_project_api.php | Diff File | ||
mod - api/soap/mc_filter_api.php | Diff File |