How to get all the issues with Java Api - I didn't get all the issues following the doc - Java API Redmine

Added by VICTOR LOPEZ 11 months ago

Hi,

I am using the next:
Redmine version 3.1.0.stable
Ruby version 2.0.0-p645 (2015-04-13) [x86_64-linux]
Rails version 4.2.3
Environment production
Database adapter Mysql2

I am trying to get all the issues that is my Redmine and I cannot do it. Here is the code that I use.

  final Map<String, String> params = new HashMap<String, String>();

        params.put("project_id", Integer.toString(projectId));
        params.put("status_id", "*");

         List<Issue> issues1 = mgr.getIssueManager().getIssues(params).getResults();
            for (Issue issue : issues1) {
                                     System.out.println(" estado " + issue.getStatusName() + " prioridad " + 
              issue.getPriorityText() + " name: " +issue.getTracker().getName() + " subject: "+ issue.getSubject());}

But I dont get all the issues, I just got the open issues.

Btw, I have also tried

final Map<String, String> params = new HashMap<String, String>();

        params.put("project_id", Integer.toString(projectId));
        params.put("status_id", "closed");

         List<Issue> issues1 = mgr.getIssueManager().getIssues(params).getResults();
            for (Issue issue : issues1) {
                                     System.out.println(" estado " + issue.getStatusName() + " prioridad " + 
              issue.getPriorityText() + " name: " +issue.getTracker().getName() + " subject: "+ issue.getSubject());}

But I dont get all the closed cases, just some of them.

Someone could help me?

Thanks.

Replies (2)

RE: How to get all the issues with Java Api - I didn't get all the issues following the doc - Java API Redmine - Added by VICTOR LOPEZ 11 months ago

I see that the maximun issues number that I get with this code is 25.

Someone can help me?

Thanks!

RE: How to get all the issues with Java Api - I didn't get all the issues following the doc - Java API Redmine - Added by Alex Last 20 days ago

you can set page size:

RedmineManager mgr = RedmineManagerFactory.createWithApiKey(uri, apiAccessKey);
// override default page size if needed
mgr.setObjectsPerPage(100);

(1-2/2)