summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniko <niko>2012-05-18 21:37:21 (GMT)
committerniko <niko>2012-05-18 21:37:21 (GMT)
commit1605e9eecb2c02406ec3691064253c8da36bcd67 (patch)
tree852d06af544cfef0e2a2dbd7440122ddb09fc9f8
parentc1afe5a2919b50e6ff10dde9df0080a77af9bb4e (diff)
downloadsynckolab-1605e9eecb2c02406ec3691064253c8da36bcd67.tar.gz
fix problem in field sync #24904
-rw-r--r--src/chrome/content/synckolab/calendarTools.js25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/chrome/content/synckolab/calendarTools.js b/src/chrome/content/synckolab/calendarTools.js
index 0384672..2791e9e 100644
--- a/src/chrome/content/synckolab/calendarTools.js
+++ b/src/chrome/content/synckolab/calendarTools.js
@@ -1460,26 +1460,37 @@ com.synckolab.calendarTools.xml2json = function (xml, syncTasks)
com.synckolab.calendarTools.getTaskStatus = function (tstatus, xmlvalue) {
var arrstatus = [];
arrstatus["IN-PROCESS"] = "in-progress";
+ arrstatus["IN-PROGRESS"] = "in-progress";
arrstatus["in-progress"] = "in-progress";
+ arrstatus["in-process"] = "in-progress";
arrstatus["NEEDS-ACTION"] = "waiting-on-someone-else";
arrstatus["CANCELLED"] = "deferred";
arrstatus["COMPLETED"] = "completed";
+
+ var val = null;
if (xmlvalue) {
var info = arrstatus[tstatus];
// not found = not-started
if(!info) {
- return "not-started";
+ val = "not-started";
+ }
+ else {
+ val = arrstatus[tstatus];
}
- return arrstatus[tstatus];
}
- /* we want to return the Lightning value */
- for (var icalval in arrstatus) {
- if (arrstatus[icalval] === tstatus) {
- return icalval;
+ else {
+ /* we want to return the Lightning value */
+ for (var icalval in arrstatus) {
+ if (arrstatus[icalval] === tstatus) {
+ val = icalval;
+ }
}
}
- return (xmlvalue ? "not-started" : "NONE");
+ if(!val)
+ return (xmlvalue ? "not-started" : "NONE");
+ else
+ return val;
};
/**