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

Bugfix/issue 1477 #1492

Closed
wants to merge 26 commits into from
Closed

Conversation

nelarsen
Copy link
Contributor

Ich wollte ursprünglich nur Issue 1477 (BookingCodes können mehrfach je Datum generiert werden) lösen, bin dann auf ein weiteres Problem gestoßen. Das lies sich am Einfachsten lösen, indem die den Bezug der BookingCodes auf timeframeId und LocationId auflöst habe. Für mich ist das noch Work in Progress, ich muss noch testen und schauen, ob alles sauber ist.

Copy link

codecov bot commented Jan 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (820fab5) 41.37% compared to head (fa1f3f6) 41.16%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1492      +/-   ##
============================================
- Coverage     41.37%   41.16%   -0.22%     
+ Complexity     2330     2315      -15     
============================================
  Files            91       91              
  Lines          9616     9547      -69     
============================================
- Hits           3979     3930      -49     
+ Misses         5637     5617      -20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…eGenerationDays parameter (the default is currently 365). Set it explicitly to self::ADVANCE_GENERATION_DAYS (like every else in these test units) which is currently 30. Before this change, the codes were generated for 365 days such that the following test would NOT trigger generation of new codes.
…s, rather than try to determine if it is necessary. This makes getLastCodeDate() (formerly known as getLastCode()) unneeded.
…s (ie 365) starting from TODAY (like comment suggests) rather than from beginning of timeframe, which could potentially be years back
…Period does not include end date by default)
…his is why DateInterval loop returned a day too much)
…world problems to be off by one here) because the timeframe begins yesterday, not today.
…ond parameter must be startDate as timestamp, not ADVANCE_GENERATION_DAYS. This correction should not change behavior, because the wrong parameter was treated just like a call with one parameter and defaults for the last three.
… value of 0 will generate a code for the reference day $date, just like getCodes() and generate(). This slight behavior change is just to make code consistent, clearer and easier to understand. It was not a bug, but a small inconsistency, and it is not covered by the tests. Since getCode() was never called with $advanceGenerationDays=0, the change will not be noticed in real world.
… render CSV) such that $advance_generation_days takes TODAY as reference instead of timeframe start which could be YEARS ago. Before this change, getCodes() without enddate would not return a code for today, when 'today' is much later than than timeframe start.
@nelarsen
Copy link
Contributor Author

Zu viel hin und her hier. Siehe stattdessen #1497

@nelarsen nelarsen closed this Jan 20, 2024
@nelarsen nelarsen deleted the bugfix/issue-1477 branch January 20, 2024 21:36
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.

BookingCodes können mehrfach je Datum generiert werden
1 participant