- Add Linear import (GraphQL, personal API key, optional team key filter).
- Centralize integration HTTP via integration_session and session_request.
- Add integration_sync_context for project/task refs and custom_fields metadata.
- Refactor Asana, GitHub, GitLab, Jira, Trello, ActivityWatch, and QuickBooks to use helpers.
- Extend integration UI, settings, and scheduled sync behavior as needed.
exchange_code_for_tokens called logger.debug without a defined logger, which triggered flake8 F821 in CI. Import logging and use getLogger(__name__) at module scope.
- When webhook_secret is set in Jira integration, verify incoming webhooks
via X-Hub-Signature-256, X-Atlassian-Webhook-Signature, or X-Hub-Signature
- Reject requests with missing or invalid signature; no secret = accept all (unchanged)
- Add webhook_secret password field to Connection Settings in Jira config
- Add tests for verification success, missing sig, and invalid sig
- Webhook models: remove duplicate index definitions so db.create_all()
no longer raises 'index already exists' (columns already have index=True)
- ImportService: fix circular import by late-importing ClientService,
ProjectService, TimeTrackingService in __init__
- reports: fix F823 by renaming unpack variable _ to _entry_count to avoid
shadowing gettext _ in export_task_excel()
- Code quality: add .flake8 with extend-ignore so flake8 CI passes;
simplify pyproject.toml isort config (drop unsupported options)
- Format: run black and isort on app/
- tests: restore minimal app fixture in test_import_export_models
OAuth: Replace deprecated accounting.transactions scope with accounting.invoices and accounting.payments so new Xero Developer apps (on or after 2026-03-02) complete the authorization flow.
Expense sync: Use /api.xro/2.0/ExpenseClaims instead of non-existent /api.xro/2.0/Expenses; read ExpenseClaimID from response.
API: Add optional json_body to _api_request and send invoice/expense payloads (Invoices and ExpenseClaims wrappers) to Xero.
Docs: Add docs/integrations/XERO.md (setup, scopes, sync, troubleshooting) and CHANGELOG entry.
Switch embedded invoice PDFs to Factur-X CII payloads and tighten the PDF/A-3 and AS4 handling so exports better match the standards they advertise. Document the experimental native Peppol transport path and cover the new validation and embedding behavior with focused tests.
Implement native PEPPOL transport plumbing (identifier validation, SMP/SML discovery, and AS4 send path) and make ZUGFeRD/PDF export fail fast when embedding or PDF/A-3 normalization fails. Add settings, migrations, validators, tests, and docs so compliance issues are visible and verifiable.
- UBL: add unitCode C62 to InvoicedQuantity (required by EN 16931 / Peppol BR-CL-23)
- ZugFerd: attach XML as Associated File with relationship Alternative
- ZugFerd: inject ZUGFeRD XMP RDF for validators
- Docs: document AF/XMP, PDF/A-3 limitation, and validation (b2brouter, portinvoice)
- Tests: assert UBL contains InvoicedQuantity with unitCode in ZugFerd and Peppol tests
- Add /reports/time-entries page listing all time entries (billed and unbilled)
- Columns: Date, Start, Stop, Duration, Project, Task, Notes, Billed, Client
- Filters: date range, user, project, client, task, billed (all/yes/no)
- Export to Excel and CSV with same filters; add Billed column to excel export
- Resolve client from entry.client or project.client in export
- Add Time Entries Report card to Reports index
Import window and web activity from a local ActivityWatch aw-server
(https://activitywatch.net/) as automatic time entries (source='auto').
- Add ActivityWatchConnector: test_connection, sync_data, get_config_schema
- Per-user integration; config: server_url, default_project_id, lookback_days,
optional bucket_ids (default: aw-watcher-window_* and aw-watcher-web_*)
- No OAuth; setup at /integrations/activitywatch/setup
- Idempotent sync via IntegrationExternalEventLink and external_uid
- Register connector; treat activitywatch as per-user in IntegrationService
- activitywatch_setup route and template; connect redirect and is_global updates
- View/manage: Configure and Edit Configuration links for activitywatch
- docs/integrations/ACTIVITYWATCH.md; tests for connector and idempotency
- Add bidirectional sync for CalendarEvent objects (similar to CalDAV)
- Import Google Calendar events as CalendarEvent instead of TimeEntry
- Sync CalendarEvent objects to Google Calendar with proper markers
- Add methods to create/update Google Calendar events from CalendarEvent
- Track imports using description markers instead of IntegrationExternalEventLink
- Prevent circular sync by checking for import markers
- Update logging to include calendar event counts alongside time entries
- Improve invoice model with enhanced prefix handling and validation
- Enhance expense routes with better error handling and validation
- Refactor PDF generator with improved template support and formatting
- Update Google Calendar integration with improved error handling
- Enhance scheduled tasks with better logging and reliability
- Update admin routes with improved permission checks
- Improve email utility with better template handling
- Update application configuration with new settings
- Enhance Google Calendar integration functionality
- Improve expenses and inventory route handlers
- Update API v1 routes with additional endpoints
- Enhance base template with UI improvements
- Enhance CalDAV calendar integration with improved event handling and error management
- Update integration service to support admin override for testing integrations
- Fix integration route handling for per-user vs global integrations
- Improve test_connection method to properly handle admin access and global integrations
- Remove requirement for default_project_id in CalDAV sync
- Update config schema to mark default_project_id as optional
- Allow importing calendar events without a project assigned
- Update setup form to show project selection as optional
- Remove disabled state from submit button when no projects exist
- Fix number field handling to allow None values for optional fields
- Update sync logic to handle events without project assignment
Add Peppol BIS Billing 3.0 (UBL) invoice sending via a configurable access point, including admin-configurable settings, per-invoice send history, and documentation/README updates.
Also introduce stock lots/allocations (valuation layers) with supporting inventory route/report/UI updates and hardened startup migration handling.
Add new client portal pages (dashboard, approvals, notifications, documents, reports) and extend API/routes/services to support client approvals, invoices/quotes views, and related notifications.
Update email templates and docs; add/adjust tests for new models/routes.
Enhanced all integrations with complete setup procedures, authentication flows,
and comprehensive configuration management.
Base Connector Enhancements:
- Extended get_config_schema() with sections, sync settings, and validation
- Added validate_config() with type checking and constraints
- Added helper methods: get_sync_settings(), get_field_mappings(), get_status_mappings()
Integration Configuration Schemas:
- All integrations now have complete config schemas with organized sections
- Support for sync direction (Import/Export/Bidirectional)
- Sync scheduling options (Manual/Hourly/Daily/Weekly)
- Data mapping configuration (status mappings, field mappings)
- Field types: string, number, boolean, select, array, json, url, text, password
- Comprehensive help text and descriptions for all fields
Enhanced Integrations:
- Jira: JQL queries, status mapping, project auto-creation
- GitHub: Repository selection, issue state filtering, webhook security
- GitLab: Project selection, issue filtering, webhook configuration
- Slack: Channel selection, notification triggers
- Asana: Workspace/project selection, completion status sync
- Trello: Board selection, list-to-status mapping
- Microsoft Teams: Channel configuration, notification settings
- QuickBooks: Customer/item/account mappings, sandbox mode
- Xero: Contact/item/account mappings
- Google Calendar: Event formatting, date range controls
- Outlook Calendar: Event formatting, date range controls
- CalDAV: Server discovery, SSL verification, lookback/lookahead
UI Enhancements:
- Section-based configuration display
- Support for all field types (select, array, number, json, boolean)
- Improved help text and descriptions
- Better visual organization and validation
Route Enhancements:
- Config schema passed to template
- Form processing for all field types
- Proper default value handling
- Validation error messages
This provides a complete, user-friendly integration setup experience with
one-button OAuth connections, configurable sync settings, and data translation
capabilities.
- Add integration-specific configuration support via get_config_schema()
- Dynamic form generation for config fields (string, boolean, text, JSON, url)
- Save integration config to database (jira_url, jql, realm_id, etc.)
- Support for all field types with validation and help text
- Improve connection status visualization
- Enhanced status badges (Connected/Not Connected, Sync OK/Error)
- Display last sync timestamp and error messages
- Grid layout for better information hierarchy
- Clear visual feedback for connection health
- Enhance sync operations
- Update last_sync_at, last_sync_status, and last_error fields
- Log sync events with metadata to IntegrationEvent table
- Better error handling and user feedback
- Clean up integrations list page
- Remove duplicate 'Your Active Integrations' table section
- Keep only card-based view with all necessary information
- Simplified, cleaner interface
- Fix f-string syntax errors in QuickBooks connector
- Extract string replacements outside f-string expressions
- Fix lines 382 and 444 that prevented connector registration
- Update navigation and admin dashboard
- Move integrations link from admin menu to Tools & Data menu
- Update admin dashboard shortcut to new integrations route
All integrations now have full configuration UI support, better status
feedback, and improved user experience.
This commit addresses multiple incomplete implementations identified in the
codebase analysis, focusing on security, functionality, and error handling.
Backend Fixes:
- Issues module: Implement proper permission filtering for non-admin users
- Users can only see issues for projects they have access to
- Added permission checks to view_issue and edit_issue routes
- Statistics now respect user permissions
- Push notifications: Implement proper subscription storage
- Created PushSubscription model for browser push notification subscriptions
- Updated routes to use new model with proper CRUD operations
- Added support for multiple subscriptions per user
- Added endpoint to list user subscriptions
Integration Improvements:
- GitHub: Implement webhook signature verification
- Added HMAC SHA-256 signature verification using webhook secret
- Uses constant-time comparison to prevent timing attacks
- Added webhook_secret field to config schema
- QuickBooks: Implement customer and account mapping
- Added support for customer mappings (client → QuickBooks customer)
- Added support for item mappings (invoice items → QuickBooks items)
- Added support for account mappings (expense categories → accounts)
- Added default expense account configuration
- Improved error handling and logging
- Xero: Add customer and account mapping support
- Added contact mappings (client → Xero Contact ID)
- Added item mappings (invoice items → Xero item codes)
- Added account mappings (expense categories → Xero account codes)
- Added default expense account configuration
- CalDAV: Implement bidirectional sync
- Added TimeTracker to Calendar sync direction
- Implemented iCalendar event generation from time entries
- Added create_or_update_event method to CalDAVClient
- Supports bidirectional sync (both directions simultaneously)
- Improved error handling for event creation/updates
- Trello: Implement bidirectional sync
- Added TimeTracker to Trello sync direction
- Implemented task to card creation and updates
- Automatic board creation for projects if needed
- Maps task status to Trello lists
- Supports bidirectional sync
- Exception handling: Improve error logging in integrations
- Replaced silent pass statements with proper error logging
- Added debug logging for non-critical failures (user info fetch)
- Improved error visibility for debugging
- Affected: Google Calendar, Outlook Calendar, Microsoft Teams, Asana, GitLab
All changes include proper error handling, logging, and follow existing code
patterns. Database migration required for push_subscriptions table.
Fix multiple issues with CalDAV calendar integration:
Error Handling & User Experience:
- Fix 'Integration not found' error after saving CalDAV configuration
- Improve error handling in view_integration route to gracefully handle missing/invalid credentials
- Add connector error display in integration view template with helpful links
- Fix 'Test Connection' button always showing errors by improving credential validation
- Add better error messages for SSL, timeout, and connection errors with actionable guidance
Sync Improvements:
- Fix sync returning 0 items with no feedback - now provides detailed messages
- Add support for DURATION-based events (not just DTEND)
- Improve sync result messages to distinguish between 'no events found' vs 'all events already imported'
- Add synced_items field for compatibility with scheduled sync tasks
- Better handling of duplicate UID race conditions during import
CalDAV Client Enhancements:
- Improve XML parsing error handling with clear error messages
- Handle empty responses gracefully (return empty multistatus for no events)
- Add time range validation in fetch_events
- Better error handling in calendar discovery with step-by-step error messages
- Improve iCalendar parsing with better error logging
Configuration & Setup:
- Add auto_sync configuration option in CalDAV setup form
- Add URL validation for server_url and calendar_url
- Ensure credentials are properly saved and integration marked as active
- Improve CalDAV setup route to handle missing credentials during initial setup
Logging & Debugging:
- Add comprehensive logging throughout sync process
- Log calendar discovery steps and event fetch operations
- Better error context in logs for troubleshooting
This addresses user-reported issues where:
- Users couldn't click on integration after saving
- Test Connection always failed with generic errors
- Sync showed 0 items with no explanation
- Credentials weren't being saved properly
Implement comprehensive CalDAV calendar integration to import calendar events
as time entries from CalDAV-compatible servers (Zimbra, Nextcloud, ownCloud).
Features:
- CalDAV client with calendar discovery and event fetching
- Automatic calendar discovery from server URL
- Import calendar events (VEVENT) as time entries
- Project matching from event titles with fallback to default project
- Idempotent sync using IntegrationExternalEventLink to prevent duplicates
- Per-user integration setup (similar to Google Calendar)
- Support for both server URL (with discovery) and direct calendar URL
- SSL certificate verification toggle for self-signed certificates
- Configurable lookback period for event import
Components:
- CalDAVCalendarConnector: Main integration connector with sync logic
- CalDAVClient: Low-level CalDAV client using PROPFIND/REPORT requests
- IntegrationExternalEventLink: Model for tracking imported events (idempotency)
- Setup UI: User-friendly form for configuration
- Comprehensive validation and error handling
- Full test coverage (unit, integration, route tests)
- Documentation: Setup guide and troubleshooting
Technical details:
- Uses icalendar library for parsing VEVENT components
- Handles timezone conversion (CalDAV UTC to app local timezone)
- Skips all-day events (only imports timed events)
- Stores credentials securely (password in access_token, username in extra_data)
- Automatic calendar discovery on first sync if only server URL provided
Migration:
- Adds integration_external_event_links table for sync tracking
- Unique constraint on (integration_id, external_uid) prevents duplicates
Documentation:
- CALDAV_INTEGRATION.md: Complete feature documentation
- CALDAV_QUICK_SETUP.md: Step-by-step setup guide with examples
Closes feature request for CalDAV/Zimbra integration.
This commit implements a comprehensive refactoring of the integration system to support both global (shared) and per-user integrations, adds new integrations, and improves the overall architecture.
Key changes:
- Add global integrations support: most integrations are now shared across all users (Jira, Slack, GitHub, Asana, Trello, GitLab, Microsoft Teams, Outlook Calendar, Xero)
- Add new integrations: GitLab, Microsoft Teams, Outlook Calendar, and Xero
- Database migrations:
* Migration 081: Add OAuth credential columns for all integrations to Settings model
* Migration 082: Add is_global flag to Integration model and make user_id nullable
- Update Integration model to support global integrations with nullable user_id
- Refactor IntegrationService to handle both global and per-user integrations
- Create dedicated admin setup pages for each integration
- Update Trello connector to use API key setup instead of OAuth flow
- Enhance all existing integrations (Jira, Slack, GitHub, Google Calendar, Asana, Trello) with global support
- Update routes, templates, and services to support the new global/per-user distinction
- Improve integration management UI with better separation of global vs per-user integrations
- Update scheduled tasks to work with the new integration architecture
Major Features:
- Integration framework with implementations for Asana, Google Calendar, QuickBooks, and Trello
- Workflow automation system with workflow engine service
- Time entry approval system with client approval capabilities
- Recurring tasks functionality
- Client portal customization and team chat features
- AI-powered categorization and suggestion services
- GPS tracking for expenses
- Gamification system with service layer
- Custom reporting with service and model support
- Enhanced OCR service for expense processing
- Pomodoro timer service
- Currency service for multi-currency support
- PowerPoint export utility
Frontend Enhancements:
- Activity feed JavaScript module
- Mentions system for team chat
- Offline sync capabilities
- New templates for approvals, chat, and recurring tasks
Database Migrations:
- Updated integration framework migrations (066-068)
- Added workflow automation migration (069)
- Added time entry approvals migration (070)
- Added recurring tasks migration (071)
- Added client portal and team chat migration (072)
- Added AI features and GPS tracking migration (073)
Documentation:
- Updated implementation documentation
- Removed obsolete feature gap analysis docs
- Added comprehensive implementation status reports
- Normalize line endings from CRLF to LF across all files to match .editorconfig
- Standardize quote style from single quotes to double quotes
- Normalize whitespace and formatting throughout codebase
- Apply consistent code style across 372 files including:
* Application code (models, routes, services, utils)
* Test files
* Configuration files
* CI/CD workflows
This ensures consistency with the project's .editorconfig settings and
improves code maintainability.
This commit introduces a comprehensive integration framework and multiple new features to enhance the TimeTracker application's capabilities.
Major Features:
- Integration Framework: Extensible system for third-party integrations with support for Jira, Slack, GitHub, and calendar services
- Project Templates: Reusable project templates for faster project creation
- Invoice Approvals: Workflow for invoice approval before sending
- Payment Gateways: Online payment processing integration with Stripe support
- Scheduled Reports: Automated report generation and email delivery
- Custom Reports: Advanced report builder with saved views
- Gantt Chart: Visual project timeline and dependency management
- Calendar Integrations: External calendar synchronization with Google Calendar support
- Push Notifications: Enhanced notification system with PWA support
Bug Fixes:
- Fix None handling in analytics routes
- Fix dynamic relationship loading issues in ProjectRepository and ProjectService
- Fix parameter ordering in service methods
- Fix None duration_seconds handling in budget forecasting
UI/UX Improvements:
- Update logo references to timetracker-logo.svg
- Add favicon links to all templates
- Add navigation items for new features
- Enhance invoice view with approval status and payment gateway links
Database:
- Add Alembic migrations for new features (065, 066, 067)
Dependencies:
- Add stripe==7.0.0 for payment processing
- Add google-api-python-client libraries for calendar integration