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: off-by-one error for month number #1294

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Conversation

dcshzj
Copy link
Contributor

@dcshzj dcshzj commented Apr 12, 2024

Problem

The month number has an off-by-one error as it is zero-indexed, which means for April, getMonth() will return 3 instead of 4.

Solution

Breaking Changes

  • Yes - this PR contains breaking changes
  • No - this PR is backwards compatible with ALL of the following feature flags in this doc

Bug Fixes:

  • Fix the off-by-one error so that invalid dates (such as 2024-02-31 is not being produced erroneously).

Tests

  • Use the form for staging (find in 1PW) to request for the site audit logs
  • Request for logs for the previous calendar month for a site that exists on staging (and you are either an Isomer Admin or collaborator of)
  • Verify that the commits in the audit logs only show those in the previous calendar month (i.e. March)

Deploy Notes

None

@dcshzj dcshzj requested a review from a team April 12, 2024 02:29
@dcshzj dcshzj merged commit f0bfd4a into develop Apr 12, 2024
19 checks passed
@mergify mergify bot deleted the fix/auditlogs-invalid-date branch April 12, 2024 02:52
seaerchin added a commit that referenced this pull request Apr 15, 2024
* fix: off-by-one error for month number (#1294)

* ref(app): shift support flows into separate folder + ecs service (#1269)

* feat(caddyfile): add initial caddyfile

* refactor(infra): shift infra stuff to new folder

* chore(formsg): shift stuff into sub folder

* refactor(server): shift infra stuff out

* refactor(common): shift shared stuff into common folder

* build(package/tsconfig): update packages + paths

* refactor(server): swap to ts

* refactor(request): update type

* feat(infra/routes): add new router

* refactor(router): shift initialisation in

* refactor(middleware): shift shared stuff out

* chore(exports): add exports from indexs

* chore(featureflag): disable single export

* feat(docker): add containers in docker-compose for infra

* feat(deploy): update deploy stuff

* chore(cleanup): remove unused/extra code in infra/server

* fix(aws_deploy): update deploy file

* fix(task def): removed portmappings

* fix(dockerfile): copy src files over

* fix(docker): update port mappings as ecs uses same network

* fix(caddy): update to use local dockerfile

* fix(caddyfile): upate proxies

* fix(caddyfile): try to netweork via loopback

* revert(aws_deploy): revert previous changes

* revert(deploy_staging): revert

* revert(task def): revert be task def

* revert(src): revert files that were used for sidecar

* refactor(support): shift into new container

* fix(docker): update dockerfile + add health check

* fix(aws_deploy): update tag

* refactor(index): remove unsnued

* fix(app spec): do replacement for container name and port

* fix(ci): update image names

* feat(support): connect db

* chore(request): remove unused import

* refactor(dockerfile): update to explicitly copy

* chore(index): add a line space

* refactor(support task def): update so that dd-service is `isomer-support` and team is isomer

* chore(formsg tests): shift tests from `src` -> `support`

* ci(sidecar): add deploy files for prod (#1285)

* feat(deploy_prod): update workflow to include deploy_support

* feat(support-task-def): add prod

* fix(task def): update dd tags to include service

* fix(dockerfile): revert to copy . (#1304)

* chore: bump version to v0.79.0

---------

Co-authored-by: Harish <[email protected]>
Co-authored-by: Hsu Zhong Jun <[email protected]>
Co-authored-by: Timothee Groleau <[email protected]>
This was referenced Jun 27, 2024
@dcshzj dcshzj mentioned this pull request Jun 27, 2024
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