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

[PM-12982] Bugfix - Fix incorrect handling of the first day of the next month is isCardExpired #11337

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

jprusik
Copy link
Contributor

@jprusik jprusik commented Sep 30, 2024

🎟️ Tracking

PM-12982

📔 Objective

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@jprusik jprusik self-assigned this Sep 30, 2024
@jprusik jprusik force-pushed the pm-12982 branch 2 times, most recently from 7c4ab27 to e1877ab Compare September 30, 2024 15:40

return cardExpiry < now;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

original code is correctly getting the last day of the card month at exactly midnight (00:00:00), but now is currently after that. We actually want to see if the current moment is on or after the first moment of the next month after the expiry month (e.g. the 1st of the next month).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I think my original intent here had been to see if the current moment was greater than the last moment of the expiry month)

@jprusik jprusik marked this pull request as ready for review September 30, 2024 15:44
@jprusik jprusik requested a review from a team as a code owner September 30, 2024 15:44
Copy link
Contributor

github-actions bot commented Sep 30, 2024

Logo
Checkmarx One – Scan Summary & Details05ee604a-03f4-40b0-9144-64a34abf0b77

No New Or Fixed Issues Found

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 33.28%. Comparing base (0ecdd46) to head (a84268a).
Report is 6 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11337      +/-   ##
==========================================
+ Coverage   33.25%   33.28%   +0.02%     
==========================================
  Files        2731     2731              
  Lines       85298    85324      +26     
  Branches    16226    16229       +3     
==========================================
+ Hits        28364    28397      +33     
+ Misses      54676    54669       -7     
  Partials     2258     2258              

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

@jprusik jprusik merged commit f1b343e into main Sep 30, 2024
66 checks passed
@jprusik jprusik deleted the pm-12982 branch September 30, 2024 16:01
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