Ideas & Approval Workflow
The Ideas entity (CIdeas) manages content ideas, pitches, and approval workflows with custom Kanban views.
Overview
Ideas move through an approval pipeline before becoming episodes or projects:
Fields
| Field | Type | Description |
|---|---|---|
name | varchar | Idea title |
stage | enum | Approval stage (see below) |
ideaType | enum | Type: Episode, Series, Special, Guest |
description | text | Idea description |
proposedBy | link | User who proposed |
assignedTo | link | Reviewer/approver |
proposedGuests | linkMultiple | Guest suggestions |
priority | enum | Low, Medium, High, Urgent |
estimatedDate | date | Target production date |
rejectionReason | text | Why rejected (if applicable) |
notes | text | Review notes |
Approval Stages
| Stage | Description | Actions |
|---|---|---|
| Pitched | Initial submission | Assign reviewer |
| Under Review | Being evaluated | Approve/Reject/Request revision |
| Needs Revision | Changes requested | Update and resubmit |
| Approved | Ready for production | Create episode/project |
| Rejected | Not approved | Archive with reason |
| In Production | Episode/project created | Track in production system |
Custom List View
The Ideas list view includes custom features:
Visual Elements
- Priority Badges: Color-coded priority indicators
- Stage Pills: Visual stage indicators
- Avatar Cards: Proposer avatars
- Guest Chips: Proposed guest tags
- Date Badges: Target date indicators
Inline Filter Bar
Quick filtering by:
- Stage (multi-select)
- Priority
- Idea type
- Proposer
- Date range
Location: espocrm/custom/client/css/modules/cideas-list.css
Custom Kanban Board
Ideas work best in Kanban view with custom styling:
┌─────────────┬──────────────┬──────────────┬───────────┬───────────┐
│ Pitched │ Under Review │ Needs Revision│ Approved │ Rejected │
├─────────────┼──────────────┼──────────────┼───────────┼───────────┤
│ │ │ │ │ │
│ ┌─────────┐ │ ┌──────────┐ │ ┌──────────┐ │ ┌───────┐ │ ┌───────┐ │
│ │🔥 HIGH │ │ │ MEDIUM │ │ │ LOW │ │ │URGENT │ │ │ LOW │ │
│ │New Idea │ │ │ Review │ │ │ Revise │ │ │Ready │ │ │ Pass │ │
│ │@user │ │ │ @reviewer│ │ │ @proposer│ │ │✓ │ │ │ ✗ │ │
│ │📅 Feb 15│ │ │ 📅 Feb 12│ │ │ 📅 Feb 10│ │ │ │ │ │ │ │
│ └─────────┘ │ └──────────┘ │ └──────────┘ │ └───────┘ │ └───────┘ │
│ │ │ │ │ │
└─────────────┴──────────────┴──────────────┴───────────┴───────────┘Enhanced Kanban View
Location: espocrm/custom/client/src/views/c-ideas/record/kanban.js
Features:
- Drag-and-Drop: Move between stages
- Color Coding: By priority
- Quick Edit: Inline field editing
- Batch Actions: Approve/reject multiple
- Custom Card Template: Rich card display
define('custom:views/c-ideas/record/kanban',
['views/record/kanban'], function (Dep) {
return Dep.extend({
template: 'c-ideas/record/kanban',
getCardTemplate: function() {
return 'c-ideas/record/kanban-card';
},
onDrop: function(id, status) {
// Handle stage change
if (status === 'Approved') {
this.showApprovalConfirm(id);
}
return this.updateModelAttribute(id, 'stage', status);
},
showApprovalConfirm: function(id) {
this.createView('approveDialog',
'custom:views/modals/idea-approve', {
modelId: id
}).render();
}
});
});Custom Detail Panel
The Ideas detail view includes a custom panel with approval workflow:
Location: espocrm/custom/client/src/views/c-ideas/record/detail-panel.js
Panel Features
Approval Section:
- Current stage indicator
- Approval history timeline
- Quick action buttons
- Assigned reviewer info
Guest Integration:
- Guest selector dropdown
- Proposed guests display
- Guest availability check
- Quick guest creation
Related Content:
- Episodes created from this idea
- Projects spawned
- Related ideas
- Similar past content
Custom Template
Location: espocrm/custom/client/res/templates/c-ideas/record/detail-panel.tpl
Approval Workflow Automation
Controller Actions
Location: espocrm/custom/Espo/Custom/Controllers/CIdeas.php
<?php
namespace Espo\Custom\Controllers;
class CIdeas extends \Espo\Core\Controllers\Base
{
public function postActionApprove($params, $data, $request)
{
$id = $data->id;
$entity = $this->getRecordService()
->getEntity($id);
// Update stage
$entity->set('stage', 'Approved');
$entity->set('approvedBy', $this->getUser()->getId());
$entity->set('approvedDate', date('Y-m-d H:i:s'));
$this->getEntityManager()->saveEntity($entity);
// Trigger automation
$this->triggerApprovalWorkflow($entity);
return true;
}
public function postActionReject($params, $data, $request)
{
$id = $data->id;
$reason = $data->reason ?? '';
$entity = $this->getRecordService()
->getEntity($id);
$entity->set('stage', 'Rejected');
$entity->set('rejectionReason', $reason);
$entity->set('rejectedBy', $this->getUser()->getId());
$this->getEntityManager()->saveEntity($entity);
return true;
}
}Project Integration
When an idea is approved, it can be converted to a project:
Hook: ApprovalWorkflow
Location: espocrm/custom/Espo/Custom/Hooks/CProject/ApprovalWorkflow.php
<?php
namespace Espo\Custom\Hooks\CProject;
class ApprovalWorkflow extends \Espo\Core\Hooks\Base
{
public function afterSave($entity, $options)
{
// If idea is approved, create project
if ($entity->get('stage') === 'Approved'
&& !$entity->get('projectCreated')) {
$this->createProjectFromIdea($entity);
}
}
private function createProjectFromIdea($idea)
{
$project = $this->getEntityManager()
->getEntity('CProject');
$project->set([
'name' => $idea->get('name'),
'description' => $idea->get('description'),
'sourceIdea' => $idea->getId(),
'assignedUser' => $idea->get('assignedTo'),
'status' => 'Planning'
]);
$this->getEntityManager()->saveEntity($project);
// Link back to idea
$idea->set('projectCreated', true);
$idea->set('relatedProject', $project->getId());
$this->getEntityManager()->saveEntity($idea);
}
}Notifications
Idea stage changes trigger notifications:
| Event | Notification | Recipient |
|---|---|---|
| Idea Pitched | "New idea submitted" | Reviewers |
| Under Review | "Your idea is being reviewed" | Proposer |
| Approved | "Your idea was approved!" | Proposer |
| Needs Revision | "Changes requested" | Proposer |
| Rejected | "Idea not approved" | Proposer |
Notification Config
Location: espocrm/custom/Espo/Custom/Resources/metadata/notificationDefs/CIdeas.json
{
"selfAssignment": true,
"assignment": true,
"statusChange": true,
"stageChange": true,
"customEvents": {
"approved": {
"type": "success",
"message": "Idea approved: {name}"
},
"rejected": {
"type": "warning",
"message": "Idea rejected: {name}"
}
}
}Best Practices
1. Clear Idea Descriptions
Ensure ideas include:
- Clear title
- Detailed description
- Target audience
- Expected outcome
- Resource requirements
2. Quick Review Cycle
- Review ideas within 48 hours
- Use "Needs Revision" for minor changes
- Provide clear rejection reasons
- Communicate decision to proposer
3. Approval Criteria
Define clear approval criteria:
- Alignment with content strategy
- Resource availability
- Audience interest
- Production feasibility
- ROI potential
4. Track Idea Pipeline
Monitor pipeline health:
- Ideas submitted per week
- Average review time
- Approval rate
- Ideas in production
Related Entities
- ContentProduction — Episodes created from ideas
- GuestBooking — Proposed guests
Custom Styling
Ideas List CSS
Location: espocrm/custom/client/css/modules/cideas-list.css
Key styles:
/* Priority badges */
.priority-badge.urgent {
background: #dc2626;
color: white;
}
.priority-badge.high {
background: #f59e0b;
}
.priority-badge.medium {
background: #3b82f6;
}
.priority-badge.low {
background: #6b7280;
}
/* Stage pills */
.stage-pill {
padding: 4px 12px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
}
.stage-pill.approved {
background: #d1fae5;
color: #065f46;
}
.stage-pill.rejected {
background: #fee2e2;
color: #991b1b;
}