Hi,
first off my motivation to use the offical JIRA Java REST client:
We have been using https://github.com/rcarz/jira-client for quite some time but it has not been updated for a very long time. Besides, it got some issues like inacurrate timestamps for comments in JIRA issues. We do not want to use the REST calls creating our own DTOs in Java. We want to move to the offical JIRA Java REST client from Atlassian which is updated more often, has more possibilities to put more things into one single request and offers you to use an asynchronus API.
However, I got multiple issues with the official JIRA Java REST client:
- Why is the documentation not updated? https://ecosystem.atlassian.net/wiki/spaces/JRJC/overview is really old and examples or even basic Java maven projects are missing. This is the only documentation I have found so far: https://www.baeldung.com/jira-rest-api It uses an old version of the Java REST client. It still works but it is not offical and really short.
- Why can I not specify which fields I want to retrieve when using: restClient.getIssueClient().getIssue(issueKey).claim();
Currently, I have to use the search client to specify only some fields I am interested in to keep the traffic low:
restClient.getSearchClient().searchJql("key = " + issueKey, 1, 0, fieldsSet).claim();
Is this the official way to do this?!
- I often get the error:
"org.codehaus.jettison.json.JSONException: A JSONObject text must begin with '{' at character 0 of ..." especially when I retrieve the issue with the search client. Is this normal? I do not want to retry the calls too often to avoid this issue.