# ListProductionOrdersByStatus

## Overview

ListProductionOrdersByStatus lists production orders for planning, execution, or closeout queues by lifecycle state.

## Business Rules

- Company scope and at least one status value are required.
- Optional filters may restrict by site, produced item, or planned date range.
- Results are ordered by planned start date and priority.
- The query returns summary-level fields suitable for operational worklists, including item, quantity, site, lifecycle state, and linked cost-summary state.

## Process Flow

```mermaid
flowchart TD
    A[Receive status and scope filters] --> B[Validate company and status filters]
    B --> C[Query matching production orders]
    C --> D[Apply optional item or date filters]
    D --> E[Return production-order summaries]
```

## External Dependencies

- None

## Error Scenarios

- **STATUS_FILTER_REQUIRED**: At least one status filter value must be provided
- **COMPANY_SCOPE_REQUIRED**: Company scope was not provided

## Test Cases

- lists released production orders for a company
- lists in-progress production orders for a site
- filters production orders by produced item when provided
- filters production orders by planned date range when provided
- returns summary fields with site and cost-summary status
- returns error when no status filter is provided
- returns error when company scope is missing
