Commit 867bb083 authored by Mickaël Guessant's avatar Mickaël Guessant

Caldav: fix #639, task description is not visible in Thunderbird, try to get...

Caldav: fix #639, task description is not visible in Thunderbird, try to get description from text body

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2459 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent 26eb558f
......@@ -1797,6 +1797,7 @@ public class EwsExchangeSession extends ExchangeSession {
getItemMethod.addAdditionalProperty(Field.get("lastmodified"));
getItemMethod.addAdditionalProperty(Field.get("calendaruid"));
getItemMethod.addAdditionalProperty(Field.get("description"));
getItemMethod.addAdditionalProperty(Field.get("textbody"));
getItemMethod.addAdditionalProperty(Field.get("percentcomplete"));
getItemMethod.addAdditionalProperty(Field.get("taskstatus"));
getItemMethod.addAdditionalProperty(Field.get("startdate"));
......@@ -1837,7 +1838,12 @@ public class EwsExchangeSession extends ExchangeSession {
}
vTodo.setPropertyValue("UID", calendarUid);
vTodo.setPropertyValue("SUMMARY", getItemMethod.getResponseItem().get(Field.get("subject").getResponseName()));
vTodo.setPropertyValue("DESCRIPTION", getItemMethod.getResponseItem().get(Field.get("description").getResponseName()));
String description = getItemMethod.getResponseItem().get(Field.get("description").getResponseName());
if (description == null) {
// Exchange 2013: try to get description from body
description = getItemMethod.getResponseItem().get(Field.get("textbody").getResponseName());
}
vTodo.setPropertyValue("DESCRIPTION", description);
vTodo.setPropertyValue("PRIORITY", convertPriorityFromExchange(getItemMethod.getResponseItem().get(Field.get("importance").getResponseName())));
vTodo.setPropertyValue("PERCENT-COMPLETE", getItemMethod.getResponseItem().get(Field.get("percentcomplete").getResponseName()));
vTodo.setPropertyValue("STATUS", taskTovTodoStatusMap.get(getItemMethod.getResponseItem().get(Field.get("taskstatus").getResponseName())));
......
......@@ -96,6 +96,7 @@ public final class Field {
FIELD_MAP.put("body", new UnindexedFieldURI("item:Body"));
FIELD_MAP.put("textbody", new UnindexedFieldURI("item:TextBody"));
// folder
FIELD_MAP.put("folderclass", new ExtendedFieldURI(0x3613, ExtendedFieldURI.PropertyType.String));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment