Skip to content

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

FieldTypeDescription
namevarcharIdea title
stageenumApproval stage (see below)
ideaTypeenumType: Episode, Series, Special, Guest
descriptiontextIdea description
proposedBylinkUser who proposed
assignedTolinkReviewer/approver
proposedGuestslinkMultipleGuest suggestions
priorityenumLow, Medium, High, Urgent
estimatedDatedateTarget production date
rejectionReasontextWhy rejected (if applicable)
notestextReview notes

Approval Stages

StageDescriptionActions
PitchedInitial submissionAssign reviewer
Under ReviewBeing evaluatedApprove/Reject/Request revision
Needs RevisionChanges requestedUpdate and resubmit
ApprovedReady for productionCreate episode/project
RejectedNot approvedArchive with reason
In ProductionEpisode/project createdTrack 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
javascript
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

handlebars
<div class="idea-detail-panel">
  <div class="approval-workflow">
    <h3>Approval Status</h3>
    <div class="stage-indicator {{stage}}">
      {{stageLabel}}
    </div>
    
    {{#if canApprove}}
      <div class="approval-actions">
        <button class="btn btn-success" data-action="approve">
          ✓ Approve
        </button>
        <button class="btn btn-warning" data-action="requestRevision">
          ↻ Request Revision
        </button>
        <button class="btn btn-danger" data-action="reject">
          ✗ Reject
        </button>
      </div>
    {{/if}}
  </div>
  
  <div class="proposed-guests">
    <h3>Proposed Guests</h3>
    {{#each guests}}
      <div class="guest-chip">
        <img src="{{avatar}}" />
        <span>{{name}}</span>
      </div>
    {{/each}}
    
    <button class="btn btn-link" data-action="addGuest">
      + Add Guest
    </button>
  </div>
</div>

Approval Workflow Automation

Controller Actions

Location: espocrm/custom/Espo/Custom/Controllers/CIdeas.php

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
<?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:

EventNotificationRecipient
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

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

Custom Styling

Ideas List CSS

Location: espocrm/custom/client/css/modules/cideas-list.css

Key styles:

css
/* 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;
}

MediaMagic CRM Documentation