Repository navigation
fix: store cost on timeline entries so exporting a timeline works - #291
Merged
Merged
Conversation
Exporting a timeline failed with HTTP 500 ("cost is not a valid
attribute") whenever the selected range contained time entries:
postTimeline() calls TimelineEntry::setCost(), but timeline entries had
no cost field or column. The timeline itself was already inserted, so
every failed export also left an empty timeline behind.
- Add a nullable cost column (cents, like work intervals) to
timetracker_timeline_entry, and the property on TimelineEntry
- Create the timeline and its entries in one transaction, so a failing
entry doesn't leave an empty timeline
- Include the cost and the total cost in the CSV download and the
e-mailed CSV
- Bump the app version to 0.0.93 so existing installs run the migration
Fixes #288
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KJpM1wJdw3Uxw5p86uRBD
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.
Exporting a timeline failed with HTTP 500 ("cost is not a valid attribute") whenever the selected range contained time entries: postTimeline() calls TimelineEntry::setCost(), but timeline entries had no cost field or column. The timeline itself was already inserted, so every failed export also left an empty timeline behind.
Fixes #288