Skip to content

feat: add paid break tracking to working time#22

Merged
barredterra merged 6 commits into
version-15from
paid-breaks
May 26, 2026
Merged

feat: add paid break tracking to working time#22
barredterra merged 6 commits into
version-15from
paid-breaks

Conversation

@barredterra

@barredterra barredterra commented May 26, 2026

Copy link
Copy Markdown
Member
  • Add paid break support to Working Time logs, allowing break rows to count toward paid working time.
  • Introduce separate productive time and paid break time totals so policy checks use productive time while reports/cards can continue using paid working time.
  • Rename the policy limit from max working time to max productive time and adds patches to migrate existing policy and working time data.
  • Update translations

@greptile-apps

greptile-apps Bot commented May 26, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

Safe to merge; logic, migrations, and tests are all correct.

The core computation, both migration patches, the policy checks, and the new tests are all logically sound. The only finding is a minor cosmetic one — paid_break_time always renders at 0 for users who never use paid breaks, while productive_time is already guarded by a depends_on condition. No data-integrity or behavioral regressions were found.

working_time/working_time/doctype/working_time/working_time.json — cosmetic visibility guard on paid_break_time.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Working Time Log row] --> B{is_break?}
    B -- No --> C[productive_time += duration\nworking_time += duration\nis_paid_break cleared to 0]
    C --> D{has project?}
    D -- Yes --> E[project_time += duration\nbillable_time += billable_duration]
    D -- No --> F[skip]
    B -- Yes --> G[break_time += duration]
    G --> H{is_paid_break?}
    H -- Yes --> I[paid_break_time += duration\nworking_time += duration]
    H -- No --> J[unpaid break - no working_time credit]
    C & I & J --> K[After all logs]
    K --> L[working_time = productive_time + paid_break_time]
    L --> M[Policy checks use productive_time\nReports and cards use working_time]
Loading

Fix All in Cursor

Reviews (2): Last reviewed commit: "docs: update README" | Re-trigger Greptile

Comment thread working_time/working_time/doctype/working_time/working_time.json
Comment thread working_time/working_time/doctype/working_time/working_time.py
Comment thread working_time/locale/de.po
@barredterra

Copy link
Copy Markdown
Member Author

@greptileai

@barredterra barredterra merged commit 04a7520 into version-15 May 26, 2026
3 checks passed
@barredterra barredterra deleted the paid-breaks branch May 26, 2026 21:56
@barredterra

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 15.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant