Timesheet Mangement #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In every folder with Stream-md-files, there shall be a .streamd.toml-file.
This .stream.toml-file should contain a timesheet-section.
In the timesheet-section, there is an array of
periods. Every period has a start day, an end day, and the expected working hours per week during that time.streamd timesheetshould be an alias forstreamd timesheet reportgive the following output:For every day intersecting with period, it should calculate the expected working hours (working days are Monday - Friday, so for an expected working hours of 38, there should be 38/5 expected working hours from Monday to Friday and 0 on the weekend. It should then also calculate the actual working hours (on sick leaves, it's always filled up the actual hours to the full day working hours artificially with the expected working hours staying the same, same for vacation etc; for overhour days actual hours should be 0 (with standard expected hours); for holidays (like easter) the expected hours should be 0.
For every month (descening) from now, print out a table of the days with their expected and actual working hours. Also, give the difference of actual and expected working hours for every month (next to the month title). In the PLAN, show a sample output.
Implementation Plan: Timesheet Management
Overview
Implement
streamd timesheet(alias forstreamd timesheet report) that displays a monthly breakdown of expected vs actual working hours based on configured periods in.streamd.toml.Configuration Format
Add to
.streamd.toml:Configuration Rules
YYYY-MM-DD)hours_per_weekis distributed over Mon-Fri (e.g., 38h/week = 7.6h/day)Sample Output
Day Type Rules
Implementation Steps
1. Extend Configuration Model (
src/config.rsor newsrc/timesheet/config.rs)Add validation:
start <= endfor each period2. Create Report Data Structures (
src/timesheet/report.rs)3. Implement Report Generation (
src/timesheet/report.rs).streamd.tomlfrom base_folder4. Update CLI (
src/cli/commands/timesheet.rs)timesheetthe default subcommand (alias forreport)5. Add Timezone Support
chrono-tzdependency for timezone handlingFiles to Modify/Create
src/config.rssrc/timesheet/config.rssrc/timesheet/report.rssrc/timesheet/mod.rssrc/cli/commands/timesheet.rsCargo.tomlchrono-tzdependencyREQUIREMENTS.mdREADME.mdTesting Strategy
.streamd.tomland markdown filesOpen Questions Resolved
I forgot about the warnings.
The timesheet should warn whenever
Implementation Plan: Timesheet Management (v2)
Overview
Implement
streamd timesheet(alias forstreamd timesheet report) that displays a monthly breakdown of expected vs actual working hours based on configured periods in.streamd.toml.Configuration Format
Add to
.streamd.toml:Configuration Rules
YYYY-MM-DD)hours_per_weekis distributed over Mon-Fri (e.g., 38h/week = 7.6h/day)Sample Output
Day Type Rules
Warning Types
The report generates three categories of warnings:
1. Missing Days Without Explanation
A warning is generated when a weekday (Mon-Fri) within a configured period has:
This helps identify forgotten entries that need to be filled in.
2. Overlapping Timecards
A warning is generated when two or more timecards on the same day have overlapping time ranges. For example:
The warning shows both timecard ranges to help identify the conflict.
3. Work Outside Configured Periods
A warning is generated when work is logged on a day that falls outside all configured periods (in a gap or before/after all periods).
Implementation Steps
1. Extend Configuration Model (
src/config.rsor newsrc/timesheet/config.rs)Add validation:
start <= endfor each period2. Create Report Data Structures (
src/timesheet/report.rs)3. Implement Overlap Detection (
src/timesheet/validation.rs)4. Implement Report Generation (
src/timesheet/report.rs).streamd.tomlfrom base_folder5. Update CLI (
src/cli/commands/timesheet.rs)timesheetthe default subcommand (alias forreport)6. Add Timezone Support
chrono-tzdependency for timezone handlingFiles to Modify/Create
src/config.rssrc/timesheet/config.rssrc/timesheet/report.rssrc/timesheet/validation.rssrc/timesheet/mod.rssrc/cli/commands/timesheet.rsCargo.tomlchrono-tzdependencyREQUIREMENTS.mdREADME.mdTesting Strategy
.streamd.tomland markdown filesChanges from v1
DayWarningenum to track per-day warningsvalidation.rsmodule for overlap detectionImplementation Complete
Branch
29_timesheet-managementhas been pushed with the following commits:86433ca- feat(timesheet): add configuration model with period validation7abf056- feat(timesheet): add report data structures282d83b- feat(timesheet): add overlap detection for timecards3429f2e- feat(timesheet): add report generation logic1119d91- feat(timesheet): add formatted report output to CLI14ae290- docs: add timesheet management documentationImplementation Summary
New files created:
src/timesheet/config.rs- TimesheetConfig, Period, RepositoryConfig structssrc/timesheet/report.rs- DayReport, DayType, DayWarning, MonthReport, TimesheetReportsrc/timesheet/validation.rs- Overlap detection for timecardssrc/timesheet/generator.rs- Report generation logicFiles modified:
Cargo.toml- Added chrono-tz dependencysrc/timesheet/mod.rs- Export new modulessrc/cli/commands/timesheet.rs- Replaced CSV output with formatted reportREADME.md- Added repository configuration documentationREQUIREMENTS.md- Added R18a, R18b, R18c requirementsTest Coverage
Stats
Please create a PR from branch
29_timesheet-managementtomain:https://git.konstantinfickel.de/kfickel/streamd/compare/main...29_timesheet-management