Skip to content

tmpo manual resolves hourly rate incorrectly for global projects #132

Description

@DylanDevelops

The problem

The tmpo manual command ignores the --project flag when resolving the hourly rate. It currently pulls the rate exclusively from settings.FindAndLoad() (the nearest .tmporc). This means global projects never get their configured rate applied to manual entries. Furthermore, if a user runs tmpo manual --project "Global Project" while inside a directory containing an unrelated .tmporc, the manual entry incorrectly inherits the local directory's rate.

Release version

0.8.6

Operating system

macOS

Steps to reproduce the behavior

  1. Initialize a global project with an hourly rate: tmpo init --global
  2. Run tmpo manual --project "Your Global Project" and create an entry.
  3. Check the entry stats. The hourly rate will be 0 (or the rate of the local directory if executed inside one with a .tmporc).

Screenshots

No response

Additional context

cmd/tracking/start.go handles this correctly using project.GetProjectConfig(projectName). manual.go should be updated to use this same logic to resolve the rate.

Metadata

Metadata

Assignees

Labels

type: bugAn issue that contains a bug report.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions