taskadapter / redmine-java-api

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

Error Create Issue #234

Closed adrianobr closed 8 years ago

adrianobr commented 8 years ago

Version Redmine 3.2 Version API JAVA Maven 2.6.0

Example Redmine API Java for Create an issue Issue issue = IssueFactory.createWithSubject("test123"); Version ver = VersionFactory.create(512); issue.setTargetVersion(ver); IssueCategory cat = IssueCategoryFactory.create(673); issue.setCategory(cat); ProjectManager projectManager = manager.getProjectManager(); Project projectByKey = projectManager.getProjectByKey("testid"); issue.setProject(projectByKey); manager.getIssueManager().createIssue(issue);

Exception in thread "main" com.taskadapter.redmineapi.RedmineFormatException: org.json.JSONException: JSONObject["issue"] not found. at com.taskadapter.redmineapi.internal.Transport.parseResponse(Transport.java:590) at com.taskadapter.redmineapi.internal.Transport.addObject(Transport.java:229) at com.taskadapter.redmineapi.IssueManager.createIssue(IssueManager.java:173) at br.com.sysmo.principal.Principal.criandoCategorias(Principal.java:76) at br.com.sysmo.principal.Principal.main(Principal.java:36) Caused by: org.json.JSONException: JSONObject["issue"] not found. at org.json.JSONObject.get(JSONObject.java:498) at org.json.JSONObject.getJSONObject(JSONObject.java:592) at com.taskadapter.redmineapi.internal.json.JsonInput.getObjectNotNull(JsonInput.java:344) at com.taskadapter.redmineapi.internal.RedmineJSONParser.getResponseSingleObject(RedmineJSONParser.java:706) at com.taskadapter.redmineapi.internal.Transport.parseResponse(Transport.java:588)

alexeyOnGitHub commented 8 years ago

does it work on older versions of Redmine for you?

adrianobr commented 8 years ago

I did not get to test! any plans to run for the latest versions?

alexeyOnGitHub commented 8 years ago

all tests currently pass on Redmine 3.2.3. can you reproduce this issue with the latest code in "master" branch?

adrianobr commented 8 years ago

hello, I use maven https://mvnrepository.com/artifact/com.taskadapter/redmine-java-api/2.6.0

It is expected to update the package maven?

alexeyOnGitHub commented 8 years ago

the latest code is not available in maven central. there were multiple commits in "master" since version 2.6.0 that is in Maven Central.

alexeyOnGitHub commented 8 years ago

this has been open for 8+ months with no recent information. closing it.