From: Dirk H. <68...@gm...> - 2011-05-22 08:48:26
|
I want to iterate through all the issues in our Mantis instance, using the SOAP API. I'm calling mc_project_get_issues, and after lowering the number of issues per page (with 50 per page it would always throw an exception on page 4, for some reason), I now get all the issues I want. My only problem now: How do I detect the end? It seems that increasing the page number will only return the same result for the last page over and over again. I could check if I've seen these issues before but surely there must be an easier way? Can I get the total number of issues for a project, for example? Code snippet: for ($p = 1; $p <= 1000; $p++) { $issues = $m->mc_project_get_issues($user, $pwd, $project_id, $p, 25); if (! is_array($issues)) { break; } // display issues here } ... and it just goes on and on. P.S. I didn't know this list existed. It's not listed on http://www.mantisbt.org/mailinglists.php but only when you follow the link to the SourceForge Mailing lists. |