So I've read in the JIRA REST API documentation that with the following JQL I am able to get all fields from an issue.
final SearchResult searchResult = restClient.getSearchClient().searchJql(userJQL,maxResults,startAt, "*all").claim();
The problem is, that I do not know, how to write the -->> *all <<-- in Java.
I just know that it is of type Array<String>.
Since I am using intellij, it recommended using
Collections.singleton("*all")
which did not lead to an error, but still was not able to get the changelog.
Any suggestions?
I think you might be confusing two different rest endpoints here. It is true in Jira Cloud you can use the REST API to get back a changelog of the issue itself. GET /rest/api/2/issue/{issueIdOrKey} explains this in more details. That *all is a parameter on the fields. I'm not exactly sure of the way this would look in JAVA, but if you were making a REST call via curl, this parameter is passed in the URL called such as:
/rest/api/2/issue/ABC-123?fields=*all
However that endpoint is designed to return to you a single issue. In your code, it looks like you're actually doing a JQL search. Which I think is a completely different endpoint of GET /rest/api/2/search
From review that, it looks like you could use the same parameter in the search and do something like:
/rest/api/2/search?jql=JQLHERE&fields=*all
However the search endpoint does not offer you the ability to pull changelog data. That can only be seen in the issue endpoint.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.