Issues with the Calendar Event Condition

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
98b427af

Issues with the Calendar Event Condition

Post by 98b427af » 24 Apr 2014 21:43

I'd like to report a (possible) bug in the Calendar Event condition, and request an extension of that condition (or a new, separate condition to handle the case described here):

Suppose you have a (not unreasonable) schedule that looks like this:
schedule.jpg
schedule.jpg (31.97 KiB) Viewed 8321 times
Using the Calendar Event condition

Currently, at either 2:00 PM or 2:18 PM the Calendar Event condition will report that the "Conference" event is active. It never reports the existence of "Seminar 1" or "Seminar 2" when the current time is within either of those events.

There may not be a good way to handle this (or any way at all, depending on what you can get from the calendar), but the current behavior seems wrong to me.

Related to this, I'd like to request a different way to query the calendar. Instead of the "before" and "after" time duration fields, have "beginning" and "ending" "from" and "to" times (with variable support). With those fields, a condition of "beginning" "from " 1:30 PM "to" 2:00 PM would report "Seminar 1" and a condition of "ending" "from" 3:00 PM "to" 3:30 PM would report "Seminar 2". A similar problem as described above would exist for "beginning" "from" 12:30 PM "to" 2:00 PM (because two different events begin in that time span), but reporting the first found would probably suffice since a flow could use the reported event's start time to check the condition again for "inner" appointments like "Seminar 1".

Obviously I haven't fleshed out the idea in detail but I think the general idea is clear.

Thanks!

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Issues with the Calendar Event Condition

Post by Martin » 25 Apr 2014 07:31

Hi,

The condition only checks if there is an event active at the moment that matches the defined criteria. It's currently not defined which event is returned in the variables when multiple events match (I think it happens to be the earliest one). I can add an additional rule or a new option to fill the variables with the properties of the most recent event which should work in your case.
As a workaround you could also add an additional condition to check for the shorter seminar events by using a title filter Seminar*. However, this won't work for the overlapping Seminar 1/Seminar 2 case.

The next version of Automagic adds a new action Query Content Provider which is capable to query the list of current calendar events within a time range and also supports variables (see examples in the action).
The action is quite generic so it's more difficult to use in general but allows to do some very interesting things with calendars, contacts and SMS. In the calendar example you can change the projection to include more fields than just title and switch to a result type Table when you want to query for multiple events each with multiple fields.

I will add your idea with the beginning/ending to the todo-list.

Regards,
Martin

98b427af

Re: Issues with the Calendar Event Condition

Post by 98b427af » 25 Apr 2014 20:02

It sounds like Query Content Provider will solve my particular problem. In the example I gave the event titles are known in advance but in the flows I'm trying to write the titles are not necessarily available. What's needed is to be able to look at an arbitrary time period and find out what events are active in that period regardless of calendar, title, etc (although those values could be supplied if known).

Anyway, it sounds like the problem will be solved. Thanks!

98b427af

Re: Issues with the Calendar Event Condition

Post by 98b427af » 30 Apr 2014 02:57

Just so you know, I downloaded the latest EAP version and Query Content Provider does solve this whole problem. In fact it looks like it's going to reduce a flow with four triggers and around 20 nodes to two triggers and three nodes.

So I'm liking it. :)

Locked