Hi All,
I am new to this
I am tring to mark an issue as duplicate on another in JIRA.
String jsonRequest = "{\"update\":{ \"issuelinks\":[{\"add\":{\"type\":{\"name\":\"Duplicate\"},\"inwardIssue\":{\"key\":\"XTABC-123\"},\"outwardIssue\":{\"key\":\"XTDEF-456\"},\"comment\":{\"body\":\"Duplicate of XTDEF-456\"}}}]}}";
many people have suggested to use JSON object instead of String
converted it to Json object
final Gson gson = new GsonBuilder().setPrettyPrinting().create();
Object jsonObject = gson.fromJson(jsonRequest, Object.class);
but got this error
{"errorMessages":["Unexpected character ('u' (code 117)): was expecting double-quote to start field name\n at [Source: org.apache.catalina.connector.CoyoteInputStream@12cc67c1; line: 1, column: 3]"]}
Please suggest where i am getting wrong.
Hi @Shal ,
Did you check the string jsonRequest is json convertible ?
Because as I see you can generate in other way
Thanks for reply @Gonchik Tsymzhitov
Is the added fields inside update in jsonRequest enough to mark one issue as duplicate of other?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.