Skip to content

Fix/293 select project tag before timer start - #294

Open
Martin-1997 wants to merge 3 commits into
masterfrom
fix/293-select-project-tag-before-timer-start
Open

Martin-1997 wants to merge 3 commits into
masterfrom
fix/293-select-project-tag-before-timer-start

Conversation

@Martin-1997

Copy link
Copy Markdown
Collaborator

No description provided.

Martin-1997 and others added 3 commits October 24, 2026 00:10
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
The Timer view only had a description field and a Start button, so a
new entry could only get its project afterwards in the list.

- Add a project and a tag selector next to the description field.
- Pre-fill them with what the server would pick: for a description that
  was used before, the project and tags of its latest entry; otherwise
  the project of the latest entry that has one. Once the user changes
  the selection, it is kept until the timer starts.
- Send the selection with POST /ajax/start-timer/{name}, which already
  accepts projectId and tags. Clearing the selection keeps the previous
  behaviour: the server copies project and tags from the latest entry
  with the same name.
- The selectors are disabled while a timer is running.

Fixes #293

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KJpM1wJdw3Uxw5p86uRBD
The Timer view sent the end date picker's value as the upper bound for
the entry list. That is the page load time initially, and midnight at
the start of the day once a date is picked, so entries started later
that day were left out: a timer started after opening the page didn't
show up in the list until reload, and picking an end date hid that
day's entries. This also kept "last used project" from updating after
starting a timer.

Send the end of the selected day instead, like the quick range presets
already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KJpM1wJdw3Uxw5p86uRBD
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.

1 participant