question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue: Calendar setting does not override global setting

See original GitHub issue

Platform: Raspberry Pi 3

Node Version: node v8.2.1

MagicMirror Version: MagicMirror v2.1.3-dev

Description:

In the calendar module documentation it states that the settings maximumEntries and maximumNumberOfDays override the global setting (defined in the root of the module config). In practice this only works for the maximumNumberOfDays setting - the maximumEntries does not override the global maximumEntries setting.

Steps to Reproduce:

Define a calendar where you specify the maximumEntries and maximumNumberOfDays both on the module level and on the calendar level. When this config is used, the calendar specific maximumNumberOfDays setting correctly overrides the global maximumNumberOfDays setting, however the calendar specific maximumEntries setting does not override the global setting. (see sample config below. The calendar correctly applies the maximum of 56 days, but it only shows 4 maximum entries instead of the expected 6 as the module documentation implies.

Expected Results:

With the config below the calendar should show 6 entries within the 56 day period.

Actual Results:

With the config below the calendar only shows 4 entries within the 56 day period.

Configuration:

		{
			module: "calendar",
			position: "top_left",
			header: "<i class=\"fa fa-plane\" aria-hidden=\"true\"></i>Schedule",
			config: {
				titleReplace: {
					NIZ: "Niet inzetbaar",
					OSV: "Ouderschaps verlof",
					KOV: "Vrij (korte opdracht)",
				},
				excludedEvents: ["Reisverlof", "EN ROUTE", "AANMELDEN", "AFMELDEN"],
				maximumEntries: 4,
				maximumNumberOfDays: 4,
				calendars: [
					{
						symbol: "",
						fadePoint: 0.3,
						maximumEntries: 6,
						maximumNumberOfDays: 56,
						url: "https://calendar.google.com/calendar/ical/[censored]/basic.ics"
					}
				]
			}
		},

Additional Notes:

I’m working on a PR to address this issue - I will also add some test cases in the very near future to prevent regression. However I’m strapped for time at the moment so this will come at a later time

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
QNimbuscommented, Aug 18, 2017

@qistoph You’re correct, I’ve started writing some test cases to properly test the calendar configuration and the global ‘maxEntries’ setting is overridden by the calendar specific ‘maxEntries’ setting.

So at the moment the calendar module is working exactly as documented (with regard to the maxEntries config setting).

I agree with you that it makes more sense to have a total maximum for the calendar module and a maximum number of entries per calendar source. But this would require a change to the calendar module source and the documentation of the calendar module configuration. If everyone agrees that this would make more sense than the current implementation I could make a PR for this change?

1reaction
QNimbuscommented, Aug 4, 2017

@qistoph I will write a test case to properly test this - in the meantime, can I see the specific part of your config.js file (the calendar part) to see how you configured your calendar? Take care to remove any private/personal URLS.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Override default settings when scheduling a meeting in MS ...
I would like to schedule tests as meetings with students and instructors listed as attendees so that the scheduling of the test and...
Read more >
Set Calendar sharing options - Google Workspace Admin Help
Click Sharing settings. In the Internal sharing options for primary calendars section, choose how your users' calendars are shared by default with other...
Read more >
Override field values - Trumba Help
To override a field default for a particular calendar only when that calendar is using a specific template, select both the template and...
Read more >
Override published sync interval - ADMX Help
This setting allows you to prevent users from overriding the sync interval published by Internet Calendar publishers. Supported on: At least Windows 7 ......
Read more >
Using Calendars
Create a set of calendars. Define calendar groups. Enter calendar overrides for a payee. Click to jump to parent topic Understanding Calendars. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found