Hello,
I am trying to prepare our code to be GDPR compliant ( [https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/\](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)) . I am doing this by passing the request header with
x-atlassian-force-account-id
= true
. But when I do that the Json Object parsing breaks, with the below error stack trace.
The User object does not return the name
property and the com.atlassian.jira.rest.client.internal.json.UserJsonParser.java still looks for it breaking the parsing.
I tried this with jira-rest-client-core*.jar
with 3.0.0, 4.0.0 and 5.1.0 versions and fails for every one of them.
Can anyone help me with this.
This is on the searchI ssues
rest API call
[https://XXX-platform.atlassian.net//rest/api/latest/search?jql=project+%3D+%27XXX%27+order+by+id&expand=schema,names&fields=-attachment,*all&maxResults=1&startAt=0](https://xxx-platform.atlassian.net//rest/api/latest/search?jql=project+%3D+%27XXX%27+order+by+id&expand=schema,names&fields=-attachment,*all&maxResults=1&startAt=0)
"throwable":"org.codehaus.jettison.json.JSONException: JSONObject[\"name\"] not found.\n\tat org.codehaus.jettison.json.JSONObject.get(JSONObject.java:360)\n\tat org.codehaus.jettison.json.JSONObject.getString(JSONObject.java:487)\n\tat com.atlassian.jira.rest.client.internal.json.JsonParseUtil.parseBasicUser(JsonParseUtil.java:192)\n\tat com.atlassian.jira.rest.client.internal.json.UserJsonParser.parse(UserJsonParser.java:34)\n\tat com.atlassian.jira.rest.client.internal.json.UserJsonParser.parse(UserJsonParser.java:31)\n\tat com.atlassian.jira.rest.client.internal.json.IssueJsonParser.getOptionalNestedField(IssueJsonParser.java:300)\n\tat com.atlassian.jira.rest.client.internal.json.IssueJsonParser.parse(IssueJsonParser.java:235)\n\tat com.atlassian.jira.rest.client.internal.json.IssueJsonParser.parse(IssueJsonParser.java:88)\n\tat com.atlassian.jira.rest.client.internal.json.GenericJsonArrayParser.parse(GenericJsonArrayParser.java:39)\n\tat com.atlassian.jira.rest.client.internal.json.SearchResultJsonParser.parse(SearchResultJsonParser.java:40)\n\tat com.atlassian.jira.rest.client.internal.json.SearchResultJsonParser.parse(SearchResultJsonParser.java:27)\n\tat ```
Thanks and Regards
Deepa