From 87f72b34e80668ee3bb0e2f37100bb08ada56f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Witek=20Wo=C5=82ejszo?= Date: Fri, 25 Apr 2014 12:16:30 +0200 Subject: [PATCH] Proper serialization of custom fields values. Before ValueTuple was serialized to toString(); --- src/main/java/net/rcarz/jiraclient/Field.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/net/rcarz/jiraclient/Field.java b/src/main/java/net/rcarz/jiraclient/Field.java index e6be262..fc0ef18 100644 --- a/src/main/java/net/rcarz/jiraclient/Field.java +++ b/src/main/java/net/rcarz/jiraclient/Field.java @@ -574,6 +574,12 @@ public final class Field { } else if (m.type.equals("string")) { if (value instanceof List) return toJsonMap((List)value); + else if (value instanceof ValueTuple) { + JSONObject json = new JSONObject(); + ValueTuple tuple = (ValueTuple)value; + json.put(tuple.type, tuple.value.toString()); + return json.toString(); + } return value.toString(); } else if (m.type.equals("timetracking")) {