Automated issue wrap-up including: - Implementation completion verification - Test execution and validation - Cost tracking and note generation - Repository state commit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,8 @@ def log(issue_id: int, duration: str, date: Optional[datetime],
|
||||
click.echo(f"❌ Invalid duration format: {e}", err=True)
|
||||
raise click.Abort()
|
||||
|
||||
# Import date module locally to avoid conflict with parameter name
|
||||
from datetime import date as date_module
|
||||
work_date = date.date() if date else None
|
||||
|
||||
try:
|
||||
@@ -72,7 +74,7 @@ def log(issue_id: int, duration: str, date: Optional[datetime],
|
||||
click.echo(f" Description: {description}")
|
||||
|
||||
# Show total time for the day
|
||||
summary = tracker.get_daily_summary(work_date or date.today())
|
||||
summary = tracker.get_daily_summary(work_date or date_module.today())
|
||||
if summary:
|
||||
hours = summary.total_minutes // 60
|
||||
minutes = summary.total_minutes % 60
|
||||
@@ -167,6 +169,7 @@ def list(issue: Optional[int], date: Optional[datetime],
|
||||
default='table', help='Output format')
|
||||
def daily(date: datetime, output_format: str):
|
||||
"""Show daily worktime summary for a specific date."""
|
||||
from datetime import date as date_module
|
||||
tracker = WorktimeTracker()
|
||||
|
||||
try:
|
||||
@@ -201,9 +204,7 @@ def daily(date: datetime, output_format: str):
|
||||
# Table format
|
||||
click.echo(f"\n📅 Daily Summary for {summary.work_date}\n")
|
||||
|
||||
hours = summary.total_minutes // 60
|
||||
minutes = summary.total_minutes % 60
|
||||
click.echo(f"Total Time: {hours}h {minutes}m ({summary.total_minutes} minutes)")
|
||||
click.echo(f"Total Time: {_format_duration(summary.total_minutes)} ({summary.total_minutes} minutes)")
|
||||
click.echo(f"Issues Worked: {summary.issue_count}")
|
||||
|
||||
if summary.cost_per_minute:
|
||||
@@ -250,10 +251,13 @@ def estimate(date: datetime, hours: float, issues: List[int], method: str):
|
||||
tracker = WorktimeTracker()
|
||||
|
||||
try:
|
||||
# Convert issues tuple to list safely
|
||||
issues_list = [int(issue) for issue in issues] if issues else None
|
||||
|
||||
result = tracker.estimate_daily_worktime(
|
||||
work_date=date.date(),
|
||||
total_hours=hours,
|
||||
issues=list(issues) if issues else None,
|
||||
issues=issues_list,
|
||||
distribution_method=method
|
||||
)
|
||||
|
||||
@@ -288,6 +292,7 @@ def estimate(date: datetime, hours: float, issues: List[int], method: str):
|
||||
@click.option('--period-id', type=int, help='Cost period ID for tracking')
|
||||
def distribute(date: datetime, total_cost: float, period_id: Optional[int]):
|
||||
"""Distribute daily costs based on time allocation."""
|
||||
from datetime import date as date_module
|
||||
tracker = WorktimeTracker()
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user