Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add per-activity time budget breakdown to project details - #6145

Open
justonawhim wants to merge 1 commit into
kimai:mainfrom
justonawhim:activity-budget-breakdown
Open

Add per-activity time budget breakdown to project details#6145
justonawhim wants to merge 1 commit into
kimai:mainfrom
justonawhim:activity-budget-breakdown

Conversation

@justonawhim

@justonawhim justonawhim commented Aug 21, 2026

Copy link
Copy Markdown

Summary

  • Adds a stacked bar under the project's "Hourly quota" (time budget) progress bar on the reporting → project details page, showing how logged time breaks down by activity, colored to match each activity's existing color.
  • Legend lists each activity's logged duration against its own individually assigned time budget, e.g. Video Content (5:30/40:00), falling back to duration-only when the activity has no time budget set.

Files

  • templates/macros/progressbar.html.twig — new progressbar_timebudget_by_activity macro
  • templates/reporting/project_details.html.twig — new "Activity" row wired into the existing budget table

Test plan

  • Verified locally on a Kimai 2.65.0 instance against a project with a time budget and two activities with logged time
  • Verify with activities that have individual time budgets set (to confirm the /XX:XX denominator)
  • Verify with a project that has no time budget (row should not render)

Adds a stacked bar under the project's "Hourly quota" progress bar on
the reporting/project details page, segmented by activity color and
sized relative to the project's time budget. The legend shows each
activity's logged duration against its own individually assigned time
budget (falling back to just the duration if the activity has none set).
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@kevinpapst

Copy link
Copy Markdown
Member

Can you please add some screenshots?!

@justonawhim

Copy link
Copy Markdown
Author
Screenshot 2026-08-23 at 00 36 59

Screenshots as requested — built this branch and ran it against a test project with an hourly quota, a money budget, and three activities (two with their own time budgets, one without):

Hourly quota: 10:30 / 40:00 used
Budget: £630.00 / £5,000.00 used
Activity breakdown (new): Video Content (5:30/40:00), Social Copy (3:00/15:00), Strategy (2:00, no budget) — each segment coloured to match its activity, legend shows time against budget or just duration when no budget is set.

🤖✨ Vibe coded the test instance with an assist from Claude.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an activity-level breakdown beneath the project time-budget progress bar.

Changes:

  • Adds a stacked, activity-colored time-budget bar and legend.
  • Integrates the breakdown into project reporting details.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
templates/macros/progressbar.html.twig Adds the activity breakdown macro.
templates/reporting/project_details.html.twig Renders the breakdown for projects with time budgets.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +167 to +168
{% if max > 0 and stat.duration > 0 %}
{% set percent = (stat.duration / (max / 100)) %}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justonawhim see above

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.

5 participants