Welcome
Guest
to Defaut site!
0
Todo System - Comprehensive Documentation
Overview
The Todo System is a comprehensive task management module within the Comserv application that allows administrators to create, manage, and track tasks with advanced filtering, time tracking, and project integration capabilities.
Note: This document consolidates information from multiple todo documentation files and provides links to all related changelog entries for complete system understanding.
Change History & Development Timeline
The Todo system has undergone significant development and enhancement. The following changelog entries document the complete development history:
System Architecture
Controller: Comserv::Controller::Todo
Location: /home/shanta/PycharmProjects/comserv2/Comserv/lib/Comserv/Controller/Todo.pm
The Todo controller handles all HTTP requests related to todo management and implements the following key features:
Access Control: Admin-only access with session validation
CRUD Operations: Create, Read, Update, Delete functionality
Advanced Filtering: Date-based, project-based, and status-based filtering
Time Tracking Integration: Integration with the logging system for time accumulation
Model: Comserv::Model::Todo
Location: /home/shanta/PycharmProjects/comserv2/Comserv/lib/Comserv/Model/Todo.pm
The Todo model provides business logic for:
Fetching todos with role-based access control
Date-based todo retrieval
Individual todo record fetching
Database Schema: Comserv::Model::Schema::Ency::Result::Todo
Location: /home/shanta/PycharmProjects/comserv2/Comserv/lib/Comserv/Model/Schema/Ency/Result/Todo.pm
Available Routes and Actions
Main Todo Management
/todo - Main Todo List
Method: GET
Access: Admin only
Features:
Displays all todos for the current site
Advanced filtering by date, project, status, and search terms
Pagination and sorting by priority and start date
Status filtering (new, in progress, completed, all)
Project-based filtering with dropdown
Search functionality across subject, description, and comments
/todo/details - Todo Details View
Method: GET
Parameters: record_id (query parameter)
Features:
Displays detailed todo information
Shows accumulated time from log entries
Formatted time display (HH:MM format)
/todo/addtodo - Add New Todo Form
Method: GET
Features:
Form for creating new todos
Project dropdown with hierarchical display
User selection dropdown
Pre-population from query parameters
/todo/edit/{record_id} - Edit Todo Form
Method: GET
Parameters: record_id (URL parameter)
Features:
Pre-populated form with existing todo data
Project and user dropdowns
Accumulated time display
/todo/modify/{record_id} - Update Todo
Method: POST
Parameters: record_id (URL parameter)
Features:
Updates existing todo with form data
Validation and error handling
Automatic last modification tracking
/todo/create - Create New Todo
Method: POST
Features:
Creates new todo from form data
Automatic field population (dates, user info)
Validation and error handling
Calendar and Time-based Views
/todo/day/{date} - Daily Todo View
Method: GET
Parameters: date (URL parameter, ISO8601 format)
Features:
Shows todos for a specific day
Date navigation controls
Fallback to current date if invalid date provided
/todo/week/{date} - Weekly Todo View
Method: GET
Parameters: date (URL parameter, ISO8601 format)
Features:
Shows todos for a specific week
Week navigation controls
Fallback to current date if invalid date provided
/todo/month/{date} - Monthly Calendar View
Method: GET
Parameters: date (URL parameter, ISO8601 format)
Features:
Calendar view of todos for a specific month
Month navigation controls
Fallback to current date if invalid date provided
Usage Guidelines
Creating a New Todo
Navigate to the Todo System by clicking on "Todo" in the main menu
Click on "Add New Todo" button
Fill in the required fields:
Site Name (pre-filled)
Start Date
Project (select from dropdown)
Due Date
Subject
Description
Estimated Man Hours
Priority
Status
Click "Add Todo" to create the todo item
Viewing Todos
Navigate to the Todo System
Use the view buttons to switch between list, day, week, and month views
Use the filter panel to filter todos by time period, project, status, or search terms
Editing a Todo
Find the todo item you want to edit in any of the views
Click the "Edit" button for that todo
Update the fields as needed
Click "Update Todo" to save your changes
Adding a Log Entry for a Todo
Find the todo item you want to log time for
Click the "Add Log" button for that todo
Fill in the log entry form
Click "Submit" to create the log entry
Integration Features
Project Integration
Full integration with the Project management system
Hierarchical project display in dropdowns
Automatic project code resolution
Project-based filtering and reporting
User Management Integration
User assignment and tracking
Session-based user identification
Role-based access control (admin only)
Time Tracking Integration
Integration with the Log system for time tracking
Automatic accumulative time calculation
Time display in HH:MM format
Historical time tracking through log entries
Logging Integration
Comprehensive logging using log_with_details method
Action tracking and debugging information
Error logging and user feedback
Performance monitoring
Security Features
Access Control
Admin-only access: All todo operations require admin role
Session validation: Comprehensive session checking in begin and auto methods
Role verification: Multiple layers of role checking
Site isolation: Todos are filtered by site name from session
Data Validation
Record ID validation: Proper handling of missing or invalid IDs
Form validation: Required field checking (e.g., sitename)
Date validation: ISO8601 date format validation with fallbacks
Input sanitization: Proper parameter handling and validation
Troubleshooting
Common Issues
Access Denied: Ensure user has admin role in session
Session Expired: Check session validity and re-login
Missing Todos: Verify site name in session matches todo records
Date Format Errors: Ensure dates are in ISO8601 format (YYYY-MM-DD)
Project Integration: Verify project controller availability
Debug Mode
Enable debug mode in session to see:
Detailed logging information
Template debugging data
Database query information
Performance metrics
Related Documentation
Core Documentation
Related Systems
Legacy Documentation References
Conclusion
The Todo System in Comserv provides a comprehensive solution for task management. With its multiple views, filtering options, and integration with the Log System, it helps users effectively manage their tasks and track their progress.
This consolidated documentation provides complete information about the Todo system, including its development history through the linked changelog entries. Administrators can use the changelog links to understand the evolution of specific features and troubleshoot issues by reviewing the implementation details.
This consolidated documentation reflects the current state of the Todo system as of January 20, 2025. For the most up-to-date information, refer to the source code and the linked changelog entries above.