Skip to content

ChesnoTech/ost-quick-buttons

Repository files navigation

ost-quick-buttons

Workflow orchestration engine for osTicket 1.18+

Transforms osTicket from a customer support ticketing system into a full operational workflow platform — assembly lines, manufacturing stages, quality control pipelines, logistics chains, or any multi-step process where tickets represent work orders flowing through departments.

Each ticket row in the agent queue shows a color-coded action button driven by status. Agents click one button to claim work, advance stages, pause for interruptions, and complete tasks — no forms, no dropdowns, no training needed. The plugin handles status changes, agent assignment, department transfers, performance tracking, and analytics automatically.

Built by ChesnoTech.


Why This Exists

osTicket is a mature, self-hosted PHP ticketing system — but it was designed for customer support, not operations. This plugin bridges that gap:

Customer Support Operational Workflow
Tickets = customer requests Tickets = work orders, assemblies, tasks
Agents respond to customers Agents perform physical/digital work
Status = open/closed Status = stage in a pipeline
One agent handles a ticket Multiple agents handle sequential stages
Resolution time matters Throughput and per-unit value matter

The plugin adds the missing pieces: one-click stage transitions, N-step pipelines per department, interruption handling (equipment issues, missing parts, breaks), performance value tracking (points per completed unit), and workflow analytics — all configured visually with zero code.


Features

Dynamic N-Step Workflows

  • Unlimited steps per department — define as many stages as your process needs
  • Per-step configuration — trigger status, target status, behavior (claim/release/none), transfer, labels, icons, colors
  • Visual Workflow Builder — full-page card-based editor with drag-to-reorder, copy, and templates
  • Status-driven buttons — the correct button appears automatically based on ticket status

Queue View Buttons

  • Claim (▶ blue) — agent takes ownership, status advances
  • Release (✔ green) — agent completes stage, releases ticket, optional department transfer
  • None (→) — status change only, no assignment change
  • Resume (▶ green) — resume interrupted work, restores pre-interruption state
  • Live timer badges — elapsed time (waiting/working) and deadline countdown on every button
  • Sticky column on desktop, vertical card column on mobile

Interruption System

  • Pause/resume tickets — handle breaks, equipment issues, missing parts, customer requests
  • Type → Variant → Sub-list hierarchy — e.g., Equipment Issue → Major → [Motor failure, Belt snap, ...]
  • Two interruption modes:
    • Simple — pause and resume in the same department
    • Sub-workflow — ticket detours through other departments (e.g., Maintenance) before returning
  • Automatic state restoration — pre-interruption status, agent, team, and department are saved and restored on resume
  • 75/25 layout split — action button (75%) + interrupt icon (25%) in the queue column
  • Internal notes — automatic thread entry with interruption details
  • Performance deductions — optional point deduction when interrupting

Performance Value Tracking

  • Fixed mode — assign a static point value per step (e.g., "Done" = 50 points)
  • Field-based mode — value comes from a ticket list field with item-to-value mappings (e.g., "Type A" = 30, "Type B" = 75)
  • Per-step values — different points for different stages in the same workflow
  • Native analytics — dashboard shows agent performance rankings by credited value
  • Undo-safe — undoing an action also reverses the performance credit

Access Control

Three modes per step:

  • Workflow Authorized — any department agent can execute (bypasses native role permissions)
  • Native Permissions — defers to osTicket's built-in role system
  • Restricted — workflow-authorized but filtered by individual agent, team, and/or role membership. Agents are grouped by department (primary + extended access). AND logic between categories, OR within each.

Safety & UX

  • Three confirmation modes — None (instant), Confirm Dialog, Countdown with auto-execute
  • Server-side trigger validation — rejects stale queue data
  • Undo — 60-second window to reverse any action (including interruptions)
  • Error recovery — rollback claim if status change fails

Analytics Dashboard

  • KPI cards — total processed, daily average, queue depth, active agents
  • Daily throughput chart — bar chart with weekly rollup for longer ranges
  • Average time per step — how long tickets spend in each status
  • Agent leaderboard — ranked by tickets processed and performance values
  • Date range picker — 7/30/90 day presets or custom range
  • Department-scoped — agents see only their accessible departments

Internationalization

9 languages: English, Russian, Arabic, Spanish, French, German, Portuguese (BR), Turkish, Chinese (Simplified). Auto-activates per agent's osTicket language preference.


Real-World Example: PC Assembly Line

A computer assembly company uses osTicket to track work orders. Each ticket = one PC to build.

Workflow Configuration

Department: Quality Control

Step 1: [▶ Start QC]     Parts Ready → QC In Progress    (claim)
Step 2: [✔ QC Complete]  QC In Progress → Ready Assembly  (release, transfer → Assembly)

Department: Assembly

Step 1: [▶ Start Build]  Ready Assembly → Building        (claim)
Step 2: [✔ Done]         Building → Ready for Packing     (release, transfer → Packing)

Department: Packing

Step 1: [▶ Start Pack]   Ready for Packing → Packing      (claim)
Step 2: [✔ Shipped]      Packing → Closed                 (release)

Interruptions (Assembly Department)

⏸ Interrupt → Equipment Issue → Major → [Motor failure, Belt snap, Power supply]
                              → Minor → [Tool missing, Calibration needed]
           → Customer Request → Missing Info
                              → Scope Change
           → Break            → Regular break

When an assembler clicks ⏸, the ticket pauses — status saved, agent released. A maintenance team can pick it up if needed. When resolved, the original agent clicks Resume and the ticket returns to exactly where it was.

Performance Tracking (Assembly Department)

Mode: Field-Based
Source Field: "Assembly Type" (list field on the ticket form)
Mappings:
  Standard Build  → 30 points
  Custom Build    → 50 points
  Server Build    → 75 points

Step values:
  Start Build → 0 points
  Done        → field value (30/50/75 based on type)

The dashboard shows which agents produce the most value, not just the most tickets.


Requirements

  • osTicket 1.18+
  • PHP 7.4+
  • MySQL 5.7+ / MariaDB 10.3+
  • Works with osTicketAwesome theme and default osTicket theme (auto-detected)

Installation

cd /path/to/osticket/include/plugins/
git clone https://github.com/ChesnoTech/ost-quick-buttons.git quick-buttons

Then in Admin Panel: Manage → Plugins → Add New Plugin → Quick Buttons → Active

Quick Start

  1. Create an instance: Plugins → Quick Buttons → Instances → Add New Instance
  2. Instance tab: Name it (usually the help topic name), set Status to "Enabled"
  3. Config tab: Select a Help Topic, set confirmation mode
  4. Open Workflow Builder: Click the button on the Config tab
  5. Enable a department: Toggle ON
  6. Add steps: Click "Add Step", configure trigger → target status and behavior
  7. Set labels/icons/colors: Customize per step (optional)
  8. Configure interruptions: Expand the Interruptions section, add types and variants
  9. Configure performance: Expand Performance Tracking, set mode and values
  10. Save: Click Save Changes

Workflow Builder

The Workflow Builder is a full-page visual editor accessible from each plugin instance's config page.

Department Card

┌─ Assembly ─────────────────────────────────── [ON] ─┐
│                                                      │
│  Step 1: [Parts Ready] ──▶── [Building]    (claim)   │
│          Label: "Start Build"  Color: #128DBE         │
│          Access: Workflow Authorized                  │
│          Perf Value: 0                                │
│                                                      │
│  Step 2: [Building] ──✔── [Ready Packing]  (release) │
│          Label: "Done"  Color: #27ae60                │
│          Access: Restricted [Assembly Team]           │
│          Perf Value: 75                               │
│          Transfer to: Packing                         │
│                                                      │
│  ⏸ Interruptions ──────────────────────────────────  │
│    Equipment Issue → Major [Motor, Belt, PSU]         │
│                   → Minor [Tool, Calibration]         │
│    Break          → Regular break                     │
│                                                      │
│  📊 Performance: Field-Based (Assembly Type)          │
│    Standard=30  Custom=50  Server=75                  │
└──────────────────────────────────────────────────────┘

Features: add/remove/reorder steps, copy config between departments, apply templates, inline validation, search departments.

API Endpoints

All endpoints are prefixed with /scp/ajax.php.

Endpoint Method Description
/quick-buttons/widgets POST Widget configs + ticket metadata for queue
/quick-buttons/execute POST Execute step action on tickets
/quick-buttons/undo POST Undo last action (60s window)
/quick-buttons/interrupt POST Interrupt a ticket (pause)
/quick-buttons/resume POST Resume an interrupted ticket
/quick-buttons/dashboard GET Dashboard data (JSON)
/quick-buttons/dashboard-page GET Standalone dashboard page
/quick-buttons/workflow-builder GET Workflow Builder page
/quick-buttons/workflow-builder-save POST Save workflow config
/quick-buttons/perf-list-fields GET List/choices form fields for perf mapping
/quick-buttons/perf-list-items/{id} GET Items for a specific list field
/quick-buttons/admin-config-data GET Departments + statuses for admin UI
/quick-buttons/check-update GET Check for plugin updates
/quick-buttons/apply-update POST Apply plugin update from GitHub
/quick-buttons/assets/* GET JS/CSS assets with ETag caching

Database Tables

Table Purpose
ost_quick_buttons_interruptions Active/resolved interruption records with pre-interruption state
ost_quick_buttons_perf_log Performance value credits per action per agent

Both tables are created automatically on first use (no manual migration needed).

File Structure

quick-buttons/
├── plugin.php                      # Plugin manifest (v5.3.1)
├── config.php                      # Config class, validation, table creation
├── class.QuickButtonsPlugin.php    # Bootstrap, routes, migrations, asset injection
├── class.QuickButtonsAjax.php      # All API endpoints and business logic
├── README.md                       # This file
├── CHANGELOG.md                    # Version history
├── CONTRIBUTING.md                 # Git Flow branching guide
├── UPGRADE.md                      # Upgrade instructions
├── LICENSE                         # MIT
├── assets/
│   ├── quick-buttons.js            # Queue view: buttons, timers, interruptions, undo
│   ├── quick-buttons.css           # Queue view styles (osTicketAwesome theme)
│   ├── quick-buttons-default.css   # Queue view styles (default theme)
│   ├── quick-buttons-admin.js      # Admin config tab enhancements
│   ├── quick-buttons-admin.css     # Admin styles
│   ├── workflow-builder.js         # Workflow Builder UI
│   ├── workflow-builder.css        # Workflow Builder styles
│   ├── workflow-dashboard.js       # Dashboard page
│   └── workflow-dashboard.css      # Dashboard styles
├── i18n/LC_MESSAGES/               # Translations (9 languages)
└── tests/
    └── QuickButtonsTest.php        # Self-contained test suite

Compatibility

Component Version
osTicket 1.18+
PHP 7.4+
MySQL 5.7+ / MariaDB 10.3+
osTicketAwesome Revision 3+ (auto-detected)
Default osTicket theme Supported (auto-detected)

Version History

See CHANGELOG.md for the full version history.

Version Milestone
5.3.1 Individual agent selection in Restricted access control
5.3.0 Interruption system (pause/resume, sub-workflows, perf deductions)
5.2.0 Performance value tracking (fixed + field-based modes)
5.1.0 Permission-aware execution (workflow/native/restricted modes)
5.0.0 Dynamic N-step workflows (replaces hardcoded variants)
4.x Auto-update, dashboard, deadline timers, workflow builder
3.x Two-step workflows, live timers, undo, bulk actions
2.x Widget architecture, confirmation modes, i18n

Support Policy

This plugin is provided as-is, free and open source, with no guaranteed support.

  • Bug reports: GitHub Issues with steps to reproduce
  • Feature requests: GitHub Issues (no timeline guarantees)
  • Pull requests: Welcome, review may take time
  • No email support, no SLA, no paid support plans

Always test in a staging environment before production. Back up your database before installing or upgrading.

Disclaimer

THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. The author is not responsible for any data loss, downtime, or damage caused by use of this plugin. It is your responsibility to test in your environment before production deployment.

This plugin modifies ticket status, assignment, and department via osTicket's built-in API. Actions (claim, transfer, status change) are permanent and trigger osTicket's native notifications.

License

MIT License. See LICENSE for details.

Author

ChesnoTechgithub.com/ChesnoTech

About

Widget-based workflow buttons for osTicket agent panel. Status-driven Start/Stop buttons with multi-step workflow support.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors