taskadapter / redmine-java-api

Redmine Java API
Apache License 2.0
270 stars 163 forks source link

How to get issues by custom field value #261

Closed mschuerer closed 8 years ago

mschuerer commented 8 years ago

Hi, I tried to get issues wit a parametre map

parameters.put("cf_1", "myValue");
List<Issue> issues1 = issueManager.getIssues(parameters);

but it allways return all issues and not only the one I expected. Any ideas? MAik

alexeyOnGitHub commented 8 years ago

hi! @mschuerer , have you tried running this query in Postman or browser? what is the URL that you are using? let's compare it to the one built by the library.

note: this is how you can use this param according to Redmine docs:

cf_x: get issues with the given value for custom field with an ID of x. (Custom field must have 'used as a filter' checked.)

see http://www.redmine.org/projects/redmine/wiki/Rest_Issues

vvmsalat commented 8 years ago

Hi, after some struggling i added the project name, then it worked for me: params.put("project_id","yourProjName");

the project name is also mentioned in the URL...