Skip to content

Comments

Claude/add workflow automations 01 p ad po fdr5rmz jgvc gsfw8r#12

Open
pqhung3007 wants to merge 4 commits intopreviewfrom
claude/add-workflow-automations-01PAdPoFDR5rmzJgvcGSFW8r
Open

Claude/add workflow automations 01 p ad po fdr5rmz jgvc gsfw8r#12
pqhung3007 wants to merge 4 commits intopreviewfrom
claude/add-workflow-automations-01PAdPoFDR5rmzJgvcGSFW8r

Conversation

@pqhung3007
Copy link
Owner

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

Implemented a comprehensive workflow automation system that allows users to automate
project management tasks based on triggers, conditions, and actions.

Backend:
- Created ProjectAutomation and AutomationLog models with full CRUD support
- Implemented automation execution engine using Django signals
- Added API endpoints for automation management and activity logging
- Created serializers with validation for automation configurations
- Added support for multiple trigger types: issue created/updated, state changed, assignee changed, comment created
- Implemented condition evaluation system with operators (is, is_not, contains, etc.)
- Added action execution for: add comment, change state, change priority, manage assignees/labels, set dates

Frontend:
- Created TypeScript types for all automation-related entities
- Built automation service layer for API communication
- Developed WorkflowAutomations component for listing and managing automations
- Created WorkflowAutomationModal for creating/editing automations
- Integrated workflow automations into project settings page
- Added real-time status toggling and deletion capabilities
- Implemented activity tracking with execution statistics

Features:
- Trigger-based automation (when work item is created, updated, state changes, etc.)
- Conditional execution (only run when specific conditions are met)
- Multi-action support (perform multiple actions in sequence)
- Execution logging and statistics
- Enable/disable automations without deletion
- Real-time UI updates with SWR

This lays the foundation for powerful workflow automation capabilities
that can significantly reduce manual project management overhead.
Enhanced the workflow automation system with improved visibility and tracking:

UI Enhancements:
- Created WorkflowAutomationsTable component with detailed table view
- Added columns: Automation name, Last run, Status, Avg duration, Executions, Owner, Created, Updated
- Implemented success/failure rate indicators with color-coded dots (green for success, red for failure)
- Added execution statistics breakdown (success ✓ / failed ✗ / skipped ⊗)
- Integrated real-time activity statistics for each automation
- Added formatted date/time display for all timestamp fields
- Implemented dropdown menu for edit/delete actions
- Added toggle switch for quick enable/disable

Activity Tracking:
- Integrated automation executions into work item activity feed
- Added IssueActivity creation for all successful automation runs
- Created human-readable action summaries (e.g., "added 2 assignee(s)", "changed priority to high")
- Activity entries show as "Automation: [automation name]" with action details
- Tracks all automation actions: comments, state changes, priority updates, assignee/label management, date setting

Features:
- Real-time statistics with SWR caching
- Success rate visualization with proportional opacity dots
- Average execution duration in ms/seconds
- Detailed execution breakdown per automation
- Complete audit trail in work item activity

This provides comprehensive visibility into automation performance and
integrates seamlessly with the existing work item activity system.
Enhanced the workflow automation system with a powerful visual builder
that supports complex conditional logic and drag-and-drop interface.

Backend Enhancements:
- Updated automation models to support nested condition groups with AND/OR logic
- Enhanced condition evaluation to handle recursive group structures
- Added validation for complex nested conditions (max 5 levels deep)
- Maintained full backward compatibility with simple array conditions
- Updated serializers to validate both simple and complex condition formats

Advanced Visual Builder:
- Created AdvancedAutomationBuilder modal with comprehensive workflow design
- Built ConditionGroupBuilder for nested AND/OR logic with visual hierarchy
- Implemented ConditionRow component for individual condition editing
- Created ActionBuilder with step-by-step action configuration
- Added support for unlimited nesting up to 3 levels
- Visual indicators for condition groups with indentation
- Real-time form validation

Complex Condition Features:
- AND/OR operators for grouping conditions
- Nested condition groups (e.g., "(A AND B) OR (C AND D)")
- Visual nesting with indentation and borders
- Add/remove condition groups dynamically
- Prevent excessive nesting (3 levels max in UI, 5 in backend)

UI Improvements:
- Dual creation modes: Quick (simple) and Advanced (complex)
- Dropdown menu for choosing builder type
- Automatic detection of complex automations when editing
- Sparkles icon for advanced builder distinction
- Improved action builder with numbered steps and visual flow
- Support for all 9 action types with proper configurations

Backward Compatibility:
- Simple array conditions still fully supported
- Old automations automatically open in simple modal
- Complex automations automatically open in advanced builder
- Seamless migration path from simple to complex

This provides teams with enterprise-grade automation capabilities
while maintaining simplicity for basic use cases.
- Create automation detail page at /settings/projects/[projectId]/automations/[automationId]
- Add breadcrumb header with dropdown to navigate between automations
- Display automation configuration, status, and execution statistics
- Update automation table to link names to detail pages
- Add quick edit dialog for automation name/description via three-dot menu
- Split edit menu: "Edit details" (quick) vs "Edit workflow" (full page)
- Consistent with cycles/modules navigation pattern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants