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

Recurring events don't show up w/ the default Calendar #2050

Closed
chamakura opened this issue Jun 19, 2020 · 4 comments
Closed

Recurring events don't show up w/ the default Calendar #2050

chamakura opened this issue Jun 19, 2020 · 4 comments

Comments

@chamakura
Copy link
Contributor

I found a bug in MagicMirror

Platform: Chrome on Windows

Node Version: 14.4

MagicMirror Version: v2.11.0

Description: Recurring Calendar events don't show up on MagicMirror. I suspect this is because the logic to handle maximumEntries is incorrectly handling events in the past. In the example below, there are six recurring events scheduled for the day. As maximumEntries is set to 2, 'Test 5' and 'Test 6' should show up on the Calendar as 'Test [1 - 4]' have already occurred in the day. But MagicMirror does not show any future events in this case as it probably considers all six events as eligible candidates, but after applying the maximumEntries condition, it probably picks 'Test 1' and 'Test 2' as the two entities. But it doesn't show them as they are in the past.

Please note that this issue doesn't happen if the events are not recurring.

Capture_Cal
Capture_MM

Steps to Reproduce:

  • Create multiple recurring events on the Calendar
  • Set maximumEntries to a number that's smaller than the events on a given day
  • Load MagicMirror after maximumEntries events have already happened

Expected Results:
The remaining events for the day should show up.

Actual Results:
MM does not show any events.

Configuration:
{ module: "calendar", header: "US Holidays", position: "top_left", config: { calendars: [ { symbol: "calendar-check", url: "***", }, ], fade: false, maximumNumberOfDays: 1, timeFormat: "absolute", dateFormat: "LT", getRelative: 0, maximumEntries: 2, excludedEvents: ['Set Status'], } }

Additional Notes:
I was able to get it to work correctly by commenting out this line. I can submit this as a fix if it looks ok.

@sdetweil
Copy link
Collaborator

yes, the calendar entry fetcher reduces the count to the first maximumEntries, but the
display code then removes entries in the past. and ends up with nothing to display
the work should be combined on the module js and removed from the fetcher, which should just fetch

@chamakura
Copy link
Contributor Author

I'm getting an error while pushing the fix for this issue:

MagicMirror git:(chamakura_mm_fix_2050) ✗ git push origin chamakura_mm_fix_2050:develop
ERROR: Permission to MichMich/MagicMirror.git denied to chamakura.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Do I need any special permission to be able to submit a change? I couldn't find anything specific in the instructions.

@rejas
Copy link
Collaborator

rejas commented Jun 20, 2020

Did you fork the repo? You can only push to your repository and then submit a PullRequest to the original repository here.

@chamakura
Copy link
Contributor Author

Thanks, @rejas! I've submitted the fix now.

MichMich added a commit that referenced this issue Jun 20, 2020
Bug fix to correctly handle the logic for 'maxEntries' Issue #2050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants