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

Take care of reminders sent last period #373

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
Draft

Conversation

trasher
Copy link
Member

@trasher trasher commented Nov 30, 2023

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Nov 30, 2023

Codecov Report

Attention: Patch coverage is 93.33333% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 47.54%. Comparing base (bb8a857) to head (b196046).
Report is 3 commits behind head on develop.

Files Patch % Lines
galette/lib/Galette/Repository/Reminders.php 93.33% 7 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #373      +/-   ##
=============================================
- Coverage      47.55%   47.54%   -0.02%     
- Complexity      6318     6321       +3     
=============================================
  Files            157      158       +1     
  Lines          23766    23790      +24     
=============================================
+ Hits           11301    11310       +9     
- Misses         12465    12480      +15     

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

@trasher
Copy link
Member Author

trasher commented Dec 1, 2023

OK, I think I'll give up for 1.0.0; this probably need to be entirely rewritten...

@trasher
Copy link
Member Author

trasher commented Apr 25, 2024

I've reworked the reminders load system; I had headache trying to change old queries.

Rather than loading late/impending members from reminders table; I choose another approach:
1- I use members filtering system to retrieve late or impending members (just as it's done UI side),
2- For each selected member, I check for an existing reminder of the same type during current period
3a- if there is no existing reminder; I just check current date is after first expected reminder one;
3b- if there is an existing reminder; I check its date against current date and found reminder one.

The logic seems (to me) more simple, therefore the code is also more simple :)
Existing unit tests are still working without changes; since I've not been able to reproduce the real issue in tests; I guess it's a good point...

Can you please check if this new proposal seems better?

Thanks!

@gagnieray
Copy link
Collaborator

Can you please check if this new proposal seems better?

I can't check right now.
I'll have a look as soon as possible in the upcoming days 😉

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