Over-Budget Locking & Documentation
The over-budget system protects against runaway scope by locking tickets when time used exceeds budget thresholds. Additionally, some organizations require documentation before tickets can be closed.
Over-Budget Locking
How It Works
When Harvest time entries sync to a ticket, the system calculates budget utilization:
Utilization = Hours Used / Budget Hours
If Utilization > Threshold → LOCK the ticket
A locked ticket cannot receive staff responses until a Project Manager (PM) unlocks it.
Tiered Thresholds
The system uses tiered multipliers based on budget size:
| Budget Range | Lock Threshold | Example |
|---|---|---|
| 0–5 hours | 150% (1.5×) | 5h budget → locks at 7.5h used |
| 5–20 hours | 125% (1.25×) | 10h budget → locks at 12.5h used |
| 20–50 hours | 115% (1.15×) | 30h budget → locks at 34.5h used |
| 50+ hours | 110% (1.1×) | 100h budget → locks at 110h used |
Smaller budgets get more leeway (150%) since small overruns are expected. Larger projects are held tighter (110%) since even small percentage overruns represent significant hours.
What Happens When a Ticket is Locked
For the Agent
- A red "OVER BUDGET — LOCKED" badge appears on the ticket
- The response form is disabled (cannot post public responses)
- Internal notes can still be posted (to communicate with team)
- A message indicates who can unlock: "Contact your PM to unlock"
- The notification system alerts the assigned PM
For the PM
- Receives notification: "Budget lock triggered on #XXXXXX"
- Appears in PM Dashboard → Budget Alerts widget
- PM reviews the situation and decides:
- Unlock — approve additional work (client agreed to more hours)
- Close — work complete, close the ticket
- Discuss — add a note and discuss with the agent
Unlocking a Ticket
PM Unlock Process
- PM opens the locked ticket
- Reviews:
- Budget hours vs. hours used
- Remaining work needed
- Client communication about additional hours
- Clicks Unlock Ticket
- Optionally adds a note (e.g., "Client approved 5 additional hours")
- Agent can now respond again
Audit Trail
Every lock and unlock event is recorded in ost_ticket_over_budget_lock:
| Field | Description |
|---|---|
ticket_id | The affected ticket |
action | locked or unlocked |
triggered_by | System (auto-lock) or staff ID (unlock) |
budget_hours | Budget at time of event |
hours_used | Hours used at time of event |
notes | Optional note from PM |
created_at | Event timestamp |
Documentation-Required Closing
Overview
Some client organizations have a flag requiring documentation before tickets can be closed. This ensures all work is properly documented for future reference.
How It Works
- An organization has the Documentation Required flag set
- Agent clicks Close on a ticket from that organization
- Instead of closing, status changes to Close Pending
- PM receives notification: "Documentation review needed for #XXXXXX"
- PM reviews the ticket and documentation
- PM clicks Acknowledge Documentation
- Ticket moves to Closed status
For the Agent
When closing a doc-required ticket:
- Ensure your responses include clear documentation of:
- What the issue was
- What was done to resolve it
- Any configuration changes made
- Steps for the client to verify
- After clicking Close, the ticket goes to "Close Pending" (not Closed)
- Wait for PM acknowledgment
For the PM
- Doc-review tickets appear in PM Dashboard → Documentation Review widget
- Open the ticket and review:
- Is the resolution clearly documented?
- Could another developer understand what was done?
- Are there any follow-up items?
- If documentation is adequate: Click Acknowledge Documentation
- If more documentation needed: Add a note to the agent
Auto-Close Skip
If a ticket would normally be auto-closed (client inactivity) but has the documentation-required flag:
- Auto-close is skipped
- Ticket remains open
- Tracked in
ost_ticket_docs_autoclose_skip - Reported in the daily docs digest (
cron-docs-digest.php, 7:30 AM CST)
Client-Closed Tickets (Doc Required)
When a client closes a doc-required ticket:
- Ticket status changes to indicate client closure
- Recorded in
ost_ticket_client_closed_docs_pending - PM receives notification for review
- PM can either:
- Acknowledge and finalize the close
- Reopen for additional documentation
This prevents clients from bypassing the documentation requirement.
Viewing Budget Status
On Individual Tickets
The ticket sidebar shows:
- Budget Hours / Hours Used / Utilization %
- Lock status (if locked)
- Lock/unlock history
On PM Dashboard
The PM Dashboard (scp/pm.php) has a Budget Alerts widget showing:
- All tickets approaching budget (75%+)
- All locked tickets awaiting unlock
- Quick-action buttons for unlock
Best Practices
For Agents
- Monitor your utilization — check the sidebar before logging significant time
- Communicate early — if you see you'll go over, note it before the lock triggers
- Log accurate time — precise Harvest entries help budget planning
- Document as you go — don't wait until close to write documentation
- Use internal notes — if locked, use notes to explain the situation to your PM
For PMs
- Set realistic budgets — account for standard overhead (communication, testing)
- Review alerts promptly — locked tickets block work progress
- Communicate with clients — before unlocking, confirm client approves additional hours
- Use the dashboard — check Budget Alerts daily
- Acknowledge docs quickly — Close Pending tickets are waiting on you
Troubleshooting
| Issue | Solution |
|---|---|
| Ticket locked but hours seem correct | Check Harvest sync is accurate; time zone differences may affect totals |
| Can't unlock (not a PM) | Only staff in PMS_REAL_LIST can unlock — contact a PM |
| Doc review notification not received | Check PM notification preferences |
| Auto-close happened despite doc-required | Verify the org flag is set correctly; check autoclose skip tracking |
| Budget shows wrong hours | Check Harvest Project ID field links to correct project |