Repository navigation
Preserve the selected start when entering manual time entry duration - #1349
Open
michalantoszczuk wants to merge 1 commit into
Open
michalantoszczuk wants to merge 1 commit into
michalantoszczuk wants to merge 1 commit into
Conversation
|
|
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.
What does this PR do?
Fixes #1348.
When someone fills in yesterday's timesheet the following morning, selecting a 09:00 start and then entering 8h currently overwrites the start by subtracting from the end. Manual creation now preserves the selected start and calculates a 17:00 end on the intended day. This avoids recording incorrect working hours while the total duration appears correct.
The shared duration input gains an optional fixed endpoint, passed through
TimeRangeFields. OnlyTimeEntryCreateModalopts into preserving the start; the other consumers retain their existing behavior.The linked issue also describes a possible Keep start fixed / Keep end fixed UI control. This patch implements the smaller change to manual creation without adding that control.
Validation
npm run test:unit: 214 tests passed across 18 files, including 8 new regression cases.showmodel type.npm run type-checkis blocked by the missing local Composer dependencyvendor/tightenco/ziggyinresources/js/app.ts; no errors remain in the changed files.Checklist (DO NOT REMOVE)