bottleneckcrm/backend/common/conditional_fields.py
Ashwin e26ab380fc Add unit tests for ticket board provider, status settable, web forms, CSV import, deal aging badge, and tickets selection
- Implement comprehensive tests for the ticket board provider to validate kanban and pipeline modes, including ticket movement and error handling.
- Create tests for ticket status settable to ensure proper status selection logic.
- Enhance web form model tests to cover ticket-specific fields and submission behavior.
- Introduce CSV import sheet tests to verify file handling and error reporting.
- Add deal aging badge tests to confirm correct display of aging statuses.
- Implement tickets selection tests to ensure UI responsiveness and functionality at various screen sizes.
2026-09-26 16:53:22 +05:30

26 lines
821 B
Python

"""
Conditional field requirements configuration.
Reference configuration for which fields are typically required
based on status. These are NOT enforced at the model
level but can be used by serializers or frontend for validation hints.
"""
# Lead: Suggested required fields by status
LEAD_REQUIRED_BY_STATUS = {
"assigned": [],
"in process": [],
"converted": ["email"], # Only email is enforced
"recycled": [],
"closed": [],
}
# Case: Suggested required fields by status
CASE_REQUIRED_BY_STATUS = {
"New": ["name", "status", "priority"],
"Assigned": ["name", "status", "priority"],
"Pending": ["name", "status", "priority"],
"Closed": ["name", "status", "priority", "closed_on"],
"Rejected": ["name", "status", "priority"],
"Duplicate": ["name", "status", "priority"],
}