Two different event types for a club makes it a requirement to use two different date fields.
The first one is regular meetings on a fixed times and weekdays during the year except for some particular days (easter, vacations, christmas, ...), which can be handled by entering them as "Exclude dates".

In some cases it is necessary to move a meeting to another weekday, and even another time. As long as the time field is the same, that particular case can be handled by using an "Include dates" entry. However, with the missing time field it is not possible to enter a different time. A time field would be nice to have for that purpose.

The second requirement is rising because the club is arranging courses/classes over several days with different times on weekdays and saturdays/sundays. To achieve this I have created a node type with a date field where "Repeating date" is set to "No".

Both types of events are going into the same calendar. By including both date fields in the "FIELDS" and "SORT CRITERIA" sections in the calendar view, and also both date fields ORed together in the "CONTEXTUAL FILTERS" section, all events are perfectly sorted in all calendar views except for the "Upcoming" view.
In the "Upcoming" view the events with the variable dates are sorted first, then the repeating events are sorted next. The attached screen dump shows this clearly. The "Upcoming" view has similar configuration except for the "CONTEXTUAL FILTER", which is cleared.

By including a time field in addition to the date field for "Include dates" option it would be possible to avoid the non repeating option all together. Both reqirements would be fulfilled by using one single date field type. I also suspect that the generated SQL would be simpler and faster.

The views, ctools, calendar and date modules are the last dev versions.

The sorting problem should clearly be fixed, and if someone have a patch to add a time field with both start and end times to the "Include dates" option, I can assure the show would go on here!

CommentFileSizeAuthor
d7_calendar.png84.55 KBeigilb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

KarenS’s picture

Category: bug » support
Priority: Major » Normal
Status: Active » Fixed

The 'Upcoming' view is not a calendar view, it is a normal view with a Date filter. if you have two different sorts on two different fields and you set up one sort before the other, you are not going to get the right results. You are getting exactly what you asked for, one field sorted before the other. The only reason the calendar view works right is that it ignores your incorrect sorting because it has to force the right sorting to get the calendar to render correctly.

eigilb’s picture

Status: Fixed » Active

KarenS,
in my opinion the date and calendar modules along with the views module are among the best modules for Drupal, and I fully understand what a enormous task it is to keep up with all the wishes and requirements. I admire the work that has been put into these modules.

However, I don't think I'm the only one with similar requirements. I also suspect that as long as "Upcoming" is a display in the calendar view from the calendar module, most people expect the same sorting behaviour in this list display as in the calendar displays. That said, I need som directions on how to get around "my incorrect sorting".

And as mentioned in the original post, if both date and time fields with start and end times was an option for "Include dates" when making a date field, this wouldn't have been an issue at all.

So with all respect, as I still need a solution for this I leave this issue active. As a support request, of course.

debo7debo’s picture

Hi KarenS,

Did you ever find a solution to this problem. I need a solution myself.

Neslee Canil Pinto’s picture

Status: Active » Closed (outdated)