Skip to content
Snippets Groups Projects
Commit 603ca1ef authored by Andreas Schindlbeck's avatar Andreas Schindlbeck
Browse files

Merge branch 'Feature_1024216_REcurrence' of gitlab.adito.de:xrm/basic

parents 1f2757c5 de429536
No related branches found
No related tags found
No related merge requests found
......@@ -6,9 +6,16 @@ import("system.datetime");
import("system.eMath");
import("system.util");
// $param.entry is potentially a recurrence exception.
if(vars.exists("$param.entry"))
{
var entry = JSON.parse(vars.getString("$param.entry"));
var masterEntry = null;
if (vars.exists("$param.masterEntry") && vars.get("$param.masterEntry") != "") {
masterEntry = JSON.parse(vars.get("$param.masterEntry"));
}
logging.log("Appointment is recurrence exception: " + (masterEntry != null))
var uid = entry[calendars.ID];
var summary = entry[calendars.SUMMARY];
......@@ -26,11 +33,24 @@ if(vars.exists("$param.entry"))
var transparency = entry[calendars.TRANSPARENCY];
var categories = entry[calendars.CATEGORIES];
var masterBegin = masterEntry != null ? masterEntry[calendars.DTSTART] : null
var masterEnd = masterEntry != null ? masterEntry[calendars.DTEND] : null
// Recurrence
var recurrenceID = entry[calendars.RECURRENCEID];
var rrule = null;
if (masterEntry != null) { // Entry is a recurrence exception, therefore get rrule from master
rrule = masterEntry[calendars.RRULE] != null ? masterEntry[calendars.RRULE][0] : null;
} else {
rrule = entry[calendars.RRULE] != null ? entry[calendars.RRULE][0] : null;
}
//@TODO Icon
result.object([
[uid, '', '', attendees.length, startdate, enddate, summary, organizer, attendees, status, links, description, location, '', classification, transparency, categories] //reminder, remindercheck
]);
[uid, '', '', attendees.length, startdate, enddate, summary, organizer,
attendees, status, links, description, location, '', classification,
transparency, categories, rrule, recurrenceID, null, masterBegin, masterEnd] //reminder, remindercheck
]);
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment