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

Enhanced Occurence Comparison for GetOccurences #306

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maxmanzero
Copy link

Updated the IRecurrable interface with IUniqueComponent. Update Occurence objects Equals and GetHashCode methods to leverage the UID property exposed on the Source property so the comparison routine in GetOccurences can distinguish between Occurences that look equal but have different underlying event data.

…que identifier property in the Occurence object. Updated the Occurence object to use the UID in the Equals and GetHashCode methods to better differentiate occurences from one another. Created a test with some example data.
@andrea-spotsoftware
Copy link

I've found the same problem with GetOccurrences.
I was writing some unit test and i found out that 2 events with the same attributes (startDate, endDate, recurrenceRule) but different Uid, are treated as duplicates by the getOccurrences method.
As a temp workaround, i've also specified the Uid in the summary 😞

Copy link

sonarcloud bot commented Oct 8, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

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

Successfully merging this pull request may close these issues.

2 participants