IanaiERP
Log InGet Started

The AI Driven ERP Solution

IanaiERP

IanaiERP is not just another ERP system. It is an AI-driven operational platform designed for modern manufacturing, wholesale, and eCommerce businesses.

Platform

  • Platform Overview
  • Inventory
  • Manufacturing
  • Sales & Fulfillment
  • Procurement
  • Finance
  • CRM
  • Integrations
  • Reporting

Industries

  • Manufacturing
  • Wholesale & Distribution
  • Food & Beverage
  • Cosmetics & Skincare
  • Biopharmaceutical
  • Fashion & Apparel

Resources

  • About Us
  • Case Studies
  • Blog
  • FAQ
  • User Guide
  • Contact

Contact

  • Address

    1440 N Lakeview Ave
    Anaheim, CA 92807

    Get Directions
  • Emailinfo@ianaierp.com

© 2026 IanaiERP. IanaiERP. All rights reserved.

Privacy PolicyTerms of ServiceLicense
Maintenance Events

Guides

⌘K

getting-started

  • Intro - ianai Total ERP SolutionPopular
  • Settings / Preferences
  • Dashboard (List View) & Reports
  • Data Import/Export

inventory

  • ItemPopular
  • Inventory Adjustment
  • Inventory Transfer
  • Lot Tracking
  • Bin Tracking
  • Item Options and Dynamic Templates
  • Serial Tracking

manufacturing

  • Bill of Materials (BOM)
  • Build
  • Routing
  • Work Orders
  • Work Plan
  • BOM Rule
  • Advanced Manufacturing

purchase

  • Procurement Workflow
  • Vendor
  • Purchase Order
  • Item Receipt
  • Blanket Purchase Order

sales

  • Sales Workflow
  • Customer
  • Estimate
  • Sales Order / Payment
  • Price Rule
  • Blanket Sales Order
  • Work Centers

shipping

  • Shipment
  • Shipping, Label Printing, and Tracking
  • Carrier Integrations
  • Ship Method Mapping
  • Rule-Based Automation
  • International Shipping
  • Third-Party Billing
  • ianaiERP Bridge
  • Troubleshooting Shipping Issues
  • USPS Cubic Rates in ianaiERP
  • USPS Pricing

return

  • Returns

miscellaneous-setup

  • Miscellaneous

customization

  • Custom Field
  • Custom Script
  • Vendor-Item Catalog
  • Units of Measure (UOM)

integration

  • Quickbooks Online Integration
  • Bigcommerce Integration
  • Shopify Integration

accounting

  • Journal
  • Transfer Funds
  • Bank Deposit
  • Expense
  • Chart of Accounts

equipment

  • Introduction
  • Equipment Hub
  • Work Centers for CAPA
  • Asset Management
  • Preventive Maintenance
  • Maintenance Events
  • Spare Parts & Consumables
  • Capacity Planner
  • Runtime Status
  • Permissions & Modules
DocsMaintenance Events

Maintenance Events

A Maintenance Event captures the actual work that happened on a piece of equipment — when it started, when it ended, who did it, how much it cost, how long the asset was down, what parts were used, and (for breakdowns) why it failed.

One MaintenanceEvent entity covers all types of maintenance work — planned and unplanned. This is intentional: splitting later is cheap; merging later is expensive. The event_type field plus the planned boolean differentiate the kind.

Where it lives

  • Create / list: Maintenance Hub at /equipment/maintenance → Events tab → + Log Event.
  • Auto-generated: PM schedules with auto_generate_event = true create SCHEDULED events at 08:00 daily.
  • Asset history: /equipment/:assetId → Maintenance History tab.
  • Permissions: maintenance_read to view, maintenance_write to log/edit/start/complete.

Event types

TypePlanned?When to use
PMyesRoutine preventive maintenance from a schedule.
INSPECTIONyesScheduled checks (safety, regulatory, condition monitoring).
CALIBRATIONyesPeriodic calibration of measurement equipment.
REPAIRusually noFixing something that broke or degraded.
BREAKDOWNnoThe asset failed unexpectedly — log first, repair-event follows.

You can flip the planned boolean independently of event_type — e.g. a planned repair during a maintenance window.

Event lifecycle

SCHEDULED  ─►  IN_PROGRESS  ─►  COMPLETE
   │
   └────► CANCELLED  (if no longer needed)
StatusWhenSide effects
SCHEDULEDCreated (manually or by cron)None. Just sits on the calendar.
IN_PROGRESSStartMaintenanceEvent RPCAsset flips runtime_status → MAINTENANCE. WC's rollup status updates. Optionally creates an AssetTransaction.
COMPLETECompleteMaintenanceEvent RPCAsset flips back to its previous status. downtime_minutes = ended_at - started_at. Linked schedule's last_done_at rolls forward. Spare-part stock decrements. maintenance_completed SSE fires.
CANCELLEDManual editRemoves the event from active counts. No side effects.

The state machine is enforced server-side. You can't skip from SCHEDULED to COMPLETE without going through IN_PROGRESS (which is what triggers the runtime-status flip).

Logging an event — full modal

The full event modal is wider (xl size) than typical forms because it contains several distinct sections.

Event type picker

Five chip-style buttons at the top: PM, Inspection, Calibration, Repair, Breakdown. Each chip shows its own icon. Picking a chip sets event_type + the planned default.

Basics

FieldNotes
Doc NumberAuto-generated. Editable for legacy imports.
AssetRequired. FetchSelect to /asset.
ScheduleOptional. Links this event to a parent MaintenanceSchedule so completing it rolls the schedule's next_due_at forward. Auto-populated when generated by cron.
Performed byWorkforce member. Picker: /support/workforce.
Work OrderOptional. Link to a WorkOrder if this maintenance was triggered by a production issue.

Timing

FieldNotes
Scheduled start / endWhen you plan to do the work. Used by the capacity calculation to subtract planned PM minutes from available capacity.
Started at / Ended atWhen the work actually happened. downtime_minutes is computed from these on completion.

For unplanned breakdowns, scheduled_start = scheduled_end = started_at is fine — you can't schedule what you didn't expect.

Downtime

downtime_minutes is the headline metric for MTTR / MTBF / availability reports. It's auto-computed from started_at and ended_at on completion, but editable so the technician can record actual downtime even when they forgot to start/end the event in real time.

Root cause (breakdown only)

For BREAKDOWN events, a text field for the operator's first-pass diagnosis. Don't make this exhaustive — it's the field-level signal. Detailed RCA goes in internal_notes.

Labor cost / Total cost

  • labor_cost — labor hours × loaded rate. Manually entered.
  • total_cost — computed: labor_cost + sum of parts_used[].line_cost. Read-only.

Parts used

Dynamic line items. Each row:

FieldNotes
ItemFetchSelect to /item filtered to is_spare_part = true.
QtyQuantity consumed.
Unit costDefaults to the item's average cost. Editable.
Line costComputed: qty × unit cost.

On CompleteMaintenanceEvent:

  • Each line's qty is deducted from inventory (the item's qty_on_hand decrements).
  • An AssetTransaction of type MAINTENANCE posts to the asset's accounting ledger with total_cost.
  • A spare_part_low_stock SSE may fire if a part dropped below safety stock.

Internal notes

Long-form free text. Procedure deviations, follow-up needed, photos via attachment, etc.

Custom fields

The maintenanceevent entity is on the custom-field allowlist. Add custom fields (text, number, choice, date, calculation) in Settings → Custom Fields and they appear here.

Quick patterns

"Just mark it done" (planned PM, no parts, no fuss)

Use the Mark Done popover on the Equipment Hub's Today's PM Schedule widget. See Preventive Maintenance → One-click Mark Done. Two clicks total.

Log an unplanned breakdown right now

  1. Equipment Hub status board → click the asset's chip → Runtime Status Quick Menu → DOWN → reason text "press belt broke".
  2. The status change flips the asset to DOWN. The hub pulses, the WC rolls up to its worst child.
  3. Maintenance Hub → Events tab → + Log Event → type BREAKDOWN → asset auto-fills → started_at = now → save as IN_PROGRESS.
  4. When repaired: open the event → fill ended_at, root_cause, parts used → Complete.
  5. Asset flips back to RUNNING (or whatever it was), schedule's next_due_at rolls forward, parts decrement, maintenance_completed fires.

Inspection that finds nothing

  1. Schedule a CALENDAR PM of type INSPECTION.
  2. When the cron fires it auto-creates a SCHEDULED event with the schedule's task list.
  3. Technician opens the event, ticks each task done, hits Complete.
  4. Asset's last_inspection_date updates automatically.

Reports the events feed

ReportSources
MTBF (mean time between failures)BREAKDOWN events on an asset. Interval = time between consecutive started_at values.
MTTR (mean time to repair)Average downtime_minutes across REPAIR + BREAKDOWN.
Downtime hrs YTDSum of downtime_minutes / 60 where ended_at falls in the current year.
Repair cost YTDSum of total_cost where event_type ∈ {REPAIR, BREAKDOWN} in the current year.
Pareto by root causeBREAKDOWN events grouped by root_cause token. Helps spot the 80/20.

All five appear on the Equipment Detail Overview tab, with a "include descendants" toggle that rolls them up across the asset's hierarchy.

Cron interactions

CronWhat it does that touches events
support-ms 08:00 dailyAuto-creates SCHEDULED events for due schedules with auto_generate_event=true.
support-ms 5-minRolls up WC current_runtime_status — affected by which assets are currently IN_PROGRESS on a maintenance event.
build-ms 02:00Capacity recompute. Planned events (scheduled but not yet IN_PROGRESS) subtract from available minutes; completed events don't.

Troubleshooting

SymptomLikely cause
Modal content overflows horizontallyReported and fixed — modal is now xl size. If it returns, check that ModalLayout still wraps it with size="xl".
Save fails with 400Required field missing (asset, event_type) or started_at > ended_at. The form's inline validation should catch most.
Completing the event doesn't decrement partsCheck the parts_used line items have valid item_id and qty > 0. Items not flagged is_spare_part still work but the FetchSelect filters them out by default.
Asset's runtime_status doesn't flip back from MAINTENANCEThe event status didn't change to COMPLETE — maybe the request failed. Open the event detail and check.
Cron-generated event has wrong assetSchedule's asset_id was wrong. Edit the schedule and recreate the event.

Related

  • Preventive Maintenance — what schedules generate events
  • Spare Parts — items used in parts_used lines
  • Asset Management — where status flips originate
  • Runtime Status — quick operator action that often precedes a breakdown event
PreviousPreventive MaintenanceNext Spare Parts & Consumables

Still have questions?

Our support team is just a click away.

Create a support ticketGet in touch