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

fix open ended permit end time calculation. #543

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

AnttiRae
Copy link
Collaborator

@AnttiRae AnttiRae commented Sep 30, 2024

Description

ParkingPermit end_time was wrong after renewal in some cases when incrementing end time by a month.

In cases where a permit's end_time was set to end of a month the end would shift down (for example after a month with 28 days). This PR fixes this so that the permits end day for next month gets set back to the original end_time's day if possible. For example end times could look like this with renewals: 31.1 -> 28.2 -> 31.3.

Context

PV-852

How Has This Been Tested?

New tests to make sure changes work as excepted.

ParkingPermit end_time was wrong after renewal in some cases when
incrementing end time by a month.

refs: PV-852
@AnttiRae AnttiRae force-pushed the PV-852-open-ended-permit-end-time-calucation-issue branch from 127e2cc to 2a7ca14 Compare October 1, 2024 11:42
Copy link

sonarqubecloud bot commented Oct 1, 2024

Copy link
Collaborator

@mhieta mhieta left a comment

Choose a reason for hiding this comment

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

LGTM! 💯

@mhieta mhieta merged commit be529e7 into develop Oct 2, 2024
2 checks passed
@mhieta mhieta deleted the PV-852-open-ended-permit-end-time-calucation-issue branch October 2, 2024 09:48
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