awesomemotive / sugarcalendar-core

Sugar Calendar plugin for WordPress
https://wordpress.org/plugins/sugar-calendar-lite/
38 stars 14 forks source link

Events archives for "upcoming" not showing "in progress" Events #225

Closed JJJ closed 3 years ago

JJJ commented 3 years ago

Reported through HelpScout here: https://secure.helpscout.net/conversation/1570570616/189495?folderId=3659659

Events starting in the past but ending in the future do not appear in either upcoming or past archive views.

For lack of anything else, I'd call these "in progress" Events, and Sugar Calendar currently has no special handling for them.

In progress Events being totally missing was partially addressed in #44, only for widgets and shortcodes. Creating this issue to document the problem and milestone it for the 2.2.2 release.

JJJ commented 3 years ago

The problem code is here:

https://github.com/sugarcalendar/core/blob/7155c47aa1925c35ec33729ee55d31ba6629d21e/sugar-calendar/includes/post/query-filters.php#L115-L124

Swapping out {$alias}.start for {$alias}.end will ensure that these "in progress" Events continue to correctly appear in the past view, while also showing in the upcoming view.

I also think we should add support for an in-progress view option while we are here.

JiveDig commented 3 years ago

Coming from https://github.com/sugarcalendar/core/issues/44 I still see this issue as well. Events that are in progress are not showing in "upcoming". An in-progress option for the shortcode/function would be great, but I'm open to whatever you decide. Thanks brother!

JiveDig commented 2 years ago

Hey @JJJ sorry to bump this, but I have 2 questions pertaining to this...

  1. The shortcode/function should be allowed to pass multiple statuses. We have a need where we want "upcoming" AND "in-progress" in the same list.
  2. The [sc_events_list] shortcode docs should get updated to show this in-progress option as well. https://docs.sugarcalendar.com/article/196-displaying-event-lists

I can open a new issue for 1 if it's something y'all would want to consider.

JJJ commented 2 years ago

@JiveDig Sure, sounds good to me!