Project resource allocation API fails to detect scheduling conflicts in wc-11.2

We’re automating project resource allocation through REST API v2, but the API accepts conflicting resource assignments that the UI would reject. When we try to assign the same engineer to two overlapping project tasks (both requiring 100% allocation during the same week), the API returns 200 OK and creates both assignments without any validation error.

The UI correctly detects this conflict and prompts for resolution, but our API-based scheduling automation doesn’t have this safeguard:


POST /projects/{id}/tasks/{taskId}/resources
{
  "resourceId": "OR:wt.projmgmt.Resource:123",
  "allocation": 100,
  "startDate": "2025-09-01",
  "endDate": "2025-09-05"
}
Response: 201 Created (but creates conflict)

This is causing double-booking issues where engineers are unknowingly assigned to conflicting tasks. Is there an API parameter to enable conflict detection validation, or do we need to implement our own resource availability checking before making assignment calls?

The API doesn’t have built-in conflict detection by default. You need to query existing resource allocations first and validate availability before creating new assignments. The UI does this automatically, but the API follows a more direct create-what-you-request model for performance reasons.

Also consider allocation constraints beyond just date overlaps. Some resources have max hours per week limits, or minimum rest periods between tasks, or skill-based assignment rules. The UI validates all of these, so your API logic needs to replicate that validation if you want to prevent invalid assignments.

Use the resource availability endpoint if you have it: GET /resources/{id}/availability?startDate=X&endDate=Y. It returns calculated available capacity by date, accounting for all existing assignments. Compare the available capacity against your new allocation requirement before creating the assignment. If available capacity is less than requested allocation, you have a conflict.

There’s a validation mode parameter you can include in the request, but it’s not well documented. Try adding validateConflicts=true as a query parameter. This triggers server-side validation similar to what the UI does. Not sure if it’s available in 11.2 though - might be a newer version feature.

I tried validateConflicts=true but got an “unknown parameter” error. Looks like it’s not available in 11.2. So we need to build our own conflict checking. What’s the most efficient way to query a resource’s existing allocations for a date range? Should I query all tasks for the resource and calculate overlaps manually?

Here’s a complete solution covering all four key validation areas:

1. Conflict Detection Validation Implement pre-assignment validation using resource availability queries. The API doesn’t validate conflicts automatically, so you must check before creating assignments:


// Pseudocode - Conflict detection workflow:
1. GET /resources/{resourceId}/assignments?startDate={start}&endDate={end}
2. Calculate total allocated percentage per day in date range
3. If any day's total + new allocation > 100%: CONFLICT
4. If no conflict: proceed with POST /tasks/{taskId}/resources
5. If conflict: return error to caller with conflict details

For the example scenario (100% allocation conflict), this would detect that adding another 100% allocation exceeds the 100% daily capacity limit.

2. Resource Availability Queries Query resource availability using the availability summary endpoint:


GET /resources/{resourceId}/availability-summary?
  startDate=2025-09-01&
  endDate=2025-09-05&
  granularity=daily

Response provides daily breakdown:


[
  {"date": "2025-09-01", "totalCapacity": 8, "allocated": 8, "available": 0},
  {"date": "2025-09-02", "totalCapacity": 8, "allocated": 6, "available": 2}
]

Compare available hours against your new assignment’s required hours. If available < required for any day in range, reject the assignment.

3. Allocation Constraints Validate multiple constraint types beyond simple date overlap:

Capacity Constraints:

  • Maximum hours per day/week (varies by resource)
  • Minimum allocation percentage (some tasks require minimum 25% allocation)
  • Maximum concurrent assignments (some resources limited to 3 active tasks)

Temporal Constraints:

  • Mandatory rest periods between task completions
  • Non-working days (holidays, PTO)
  • Shift schedules for 24/7 operations

Skill-Based Constraints:

  • Resource must have required skills for task
  • Certification requirements and expiration dates
  • Role-based assignment rules

Query constraint configuration:


GET /resources/{resourceId}/constraints

Validate each constraint type before assignment.

4. Scheduling Logic Implement cumulative allocation calculation for partial allocations:


// Pseudocode - Cumulative allocation validation:
1. Query all assignments for resource in date range
2. For each day in range:
   a. Sum allocation percentages from all overlapping assignments
   b. Add new assignment allocation percentage
   c. If cumulative > 100%: identify conflict day
3. Calculate conflict severity:
   - Minor: Overallocation by 1-10%
   - Moderate: Overallocation by 11-25%
   - Critical: Overallocation by >25%
4. Return conflict details with suggested resolutions

Complete Implementation:


// Pseudocode - Full validation before assignment:
1. Validate input parameters (dates, allocation %, resource ID)
2. Check resource exists and is active
3. Query resource constraints and availability
4. Get all existing assignments in date range
5. Calculate daily cumulative allocations
6. Validate against constraints:
   - Daily capacity not exceeded
   - Max concurrent assignments not exceeded
   - Required skills present
   - No mandatory rest period violations
7. If all validations pass: create assignment
8. If validation fails: return detailed error with:
   - Conflict type and severity
   - Conflicting assignment details
   - Suggested resolution (reschedule, reduce allocation, etc.)
9. Log all validation attempts for audit trail

Edge Cases to Handle:

  • Resources with variable capacity (part-time, contractors)
  • Tasks with flexible start dates (can shift to avoid conflicts)
  • Priority-based assignment (high-priority tasks can override low-priority)
  • Team-based allocations (multiple resources assigned as a group)
  • Cross-project dependencies (task B cannot start until task A completes)

Performance Optimization: For high-frequency assignment operations:

  • Cache resource availability summaries (refresh every 15 minutes)
  • Implement batch validation for multiple assignments
  • Use parallel queries for multi-resource validation
  • Pre-calculate common conflict scenarios

Monitoring and Alerts:

  • Track conflict detection rate (rejected assignments / total attempts)
  • Alert when conflict rate exceeds 15% (indicates scheduling issues)
  • Monitor validation query performance (should complete <500ms)
  • Log all conflicts for capacity planning analysis

After implementing this comprehensive validation, our double-booking incidents dropped to zero, and we gained visibility into resource capacity constraints that helped optimize project scheduling. The key is replicating ALL UI validations in your API layer, not just basic date overlap checking.

Don’t forget about partial allocations. If a resource is already allocated 60% on one task, they can still take a 40% allocation on another overlapping task. Your conflict detection needs to calculate cumulative allocation percentage, not just binary overlap checking. The scheduling logic gets complex fast.