Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter upcoming events on the basis of their end date and time. #6955

Closed
Anupam-dagar opened this issue Apr 15, 2019 · 7 comments · Fixed by #7049
Closed

Filter upcoming events on the basis of their end date and time. #6955

Anupam-dagar opened this issue Apr 15, 2019 · 7 comments · Fixed by #7049

Comments

@Anupam-dagar
Copy link
Member

Describe the bug

Currently the events are being filtered on the basis of end date only. If an event is single day event of 2hrs, then the vent will get removed from upcoming events on the next day. The event should not be shown in upcoming events if it is over.

To Reproduce
Steps to reproduce the behaviour:

  1. Create an event.
  2. Set event start time and end time for a small period.
  3. After the event is over, it is still shown in upcoming events.

Expected behaviour

Once the event is over, it should not be shown in the upcoming events or browse events.

Screenshots

Screenshot from 2019-04-15 18-05-18

Screenshot from 2019-04-15 18-05-11

Additional context

I am working on this issue.

@iamareebjamal
Copy link
Member

This shouldn't even be handled on frontend, this should be provided by the server

@iamareebjamal iamareebjamal transferred this issue from fossasia/open-event-frontend Apr 27, 2020
@mansiag
Copy link
Contributor

mansiag commented Jun 5, 2020

Can I work on this issue?

@snitin315
Copy link
Member

Go ahead

@mansiag
Copy link
Contributor

mansiag commented Jun 5, 2020

why do we use filter, ( starts_at > current_time or ends_at > current_time) for the upcoming events, when we can only use (ends_at > current_time) as ends_at time is always greater than starts_at and ends_at is never empty in any published event?

@iamareebjamal
Copy link
Member

That's better because then we'll also be showing events which are currently happening

@mansiag
Copy link
Contributor

mansiag commented Jun 5, 2020

We can show both the future events and events which are currently happening by only checking ends_at > current_time. We don't need starts_at comparison for that.

@iamareebjamal
Copy link
Member

Exactly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants