Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestGetTaskData.java')
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestGetTaskData.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestGetTaskData.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestGetTaskData.java
index e08d4774d..0e2884f63 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestGetTaskData.java
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestGetTaskData.java
@@ -38,6 +38,7 @@ import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.osgi.util.NLS;
+import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
@@ -150,6 +151,17 @@ public class BugzillaRestGetTaskData extends BugzillaRestGetRequest<List<TaskDat
"Can not parse Date (" + value.getAsString() + ")"))); //$NON-NLS-1$ //$NON-NLS-2$
}
}
+ } else if (entry.getKey().equals("flags")) { //$NON-NLS-1$
+ JsonArray array = entry.getValue().getAsJsonArray();
+ if (!array.isJsonNull()) {
+ for (JsonElement jsonElement : array) {
+ BugzillaRestFlagMapper flagMapper = new Gson().fromJson(jsonElement,
+ BugzillaRestFlagMapper.class);
+ TaskAttribute attribute = taskData.getRoot()
+ .createAttribute(IBugzillaRestConstants.KIND_FLAG + flagMapper.getNumber());
+ flagMapper.applyTo(attribute);
+ }
+ }
}
TaskAttribute attribute = taskData.getRoot().getAttribute(attributeId);

Back to the top