Repository navigation
Conversation
Calendar refuses a new meeting start date that is in the past and took "now" from the system clock, through DateUtils.getLocalDateOfTenant, in both updateStartDateAndDerivedFeilds and update. Everything around it uses the business date: DateUtils.isDateInTheFuture is isAfterBusinessDate, MeetingWriteServiceImpl refuses a meeting after the business date, and MeetingsApiResource generates recurring dates up to it. With the business date behind the system date, which is the normal state during catch-up or end-of-day processing, a start date that is valid for meetings was rejected as past, so a calendar could not be moved to the date its own meetings were being written on. With the business date ahead, a date the platform treats as past was accepted. Judge both against DateUtils.getBusinessLocalDate. The recurrence generation in CalendarUtils and CalendarReadPlatformServiceImpl also derives a current date from the system clock. That is a wider question about recurrence and is left alone here. Assisted-By: Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Calendarrefuses a new meeting start date that is "in the past", and decides what is past from thesystem clock:
Everything around it uses the business date:
DateUtils.isDateInTheFuture(date)isisAfterBusinessDate(date)— the platform's own definitionof the future.
MeetingWriteServiceImplrefuses a meeting dated afterDateUtils.getBusinessLocalDate().MeetingsApiResourcegenerates recurring dates up toDateUtils.getBusinessLocalDate().When it bites
With the business date behind the system date — the normal state during catch-up or end-of-day
processing — a start date that is valid for meetings, on or after the business date, is rejected as
being in the past, so the calendar cannot be moved to the date its own meetings are being written on.
With the business date ahead of the system date, a date the platform treats as past is accepted.
Changes
DateUtils.getBusinessLocalDate().fineract-core: a start date on the business date and one after it areaccepted, one before it is refused. The first two fail against the unfixed code, because with the
business date set behind the system date they are "past" by the system clock.
Whole-module runs after the change:
:fineract-core:test672 tests, and the provider's calendartests, 63 tests, both green.
Not included
CalendarUtilsandCalendarReadPlatformServiceImplalso derive a current date from the systemclock when generating recurring dates. Whether recurrence generation should follow the business date
is a wider question and is left out of this change.
Checklist