Skip to content

Commit

Permalink
event.isRecurring() does not repeat with RECURRENCE-ID without RANGE
Browse files Browse the repository at this point in the history
Evolution creates instances of events, which contain RRULE and RECURRENCE-ID
without RANGE parameter.  Since the RANGE is not THISANDFUTURE, but absent,
such events do not recur.

https://gitlab.gnome.org/GNOME/evolution/-/issues/1180
  • Loading branch information
dilyanpalauzov committed Sep 13, 2022
1 parent 0087056 commit b1e572e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/ical/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,18 @@ ICAL.Event = (function() {
},

/**
* Checks if the event is recurring
* Checks if the event is recurring, thus has an RRULE or RDATE property, or a
* RECURRENCE-ID with the respective RANGE parameter.
*
* @return {Boolean} True, if event is recurring
*/
isRecurring: function() {
var comp = this.component;
return comp.hasProperty('rrule') || comp.hasProperty('rdate');
var comp = this.component, recurrenceId;
if (comp.hasProperty('rrule') || comp.hasProperty('rdate')) {
recurrenceId = comp.getFirstProperty('recurrence-id');
return !recurrenceId || !!recurrenceId.getParameter('range');
}
return false;
},

/**
Expand Down

0 comments on commit b1e572e

Please sign in to comment.