> ## Documentation Index
> Fetch the complete documentation index at: https://onetest.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OQL Field Reference

> All searchable fields in OneTest Query Language

Complete reference of all fields you can query in OQL.

## Test Case Fields

### Identifiers & Metadata

| Field | Type | Description | Example |
| - | - | - | - |
| `identifier` | string | Test case ID (TC-NNN) | `identifier ^ "TC-10"` |
| `title` | string | Test case title | `title ~ "login"` |
| `description` | string | Test description | `description ~ "authentication"` |
| `test_type` | enum | manual, automated, exploratory | `test_type = manual` |
| `status` | enum | draft, ready, deprecated, archived | `status = ready` |
| `priority` | enum | p1, p2, p3, p4 | `priority IN (p1, p2)` |
| `component` | string | Component name | `component = "checkout"` |
| `automation_status` | enum | not\_automated, candidate, automated | `automation_status = automated` |

### Dates & Times

| Field | Type | Description | Example |
| - | - | - | - |
| `created_at` | datetime | When created | `created_at >= -7d` |
| `updated_at` | datetime | Last modified | `updated_at >= startOfMonth()` |
| `archived_at` | datetime | When archived | `archived_at IS NOT NULL` |

### Organization

| Field | Type | Description | Example |
| - | - | - | - |
| `folder_id` | uuid | Parent folder | `folder_id IS NOT NULL` |
| `tags` | array | Test tags | `tags CONTAINS "smoke"` |

### Ownership

| Field | Type | Description | Example |
| - | - | - | - |
| `created_by` | string | Creator user ID | `created_by = "user_123"` |
| `owner` | string | Test case owner | `owner IS NOT NULL` |

## Release Fields

| Field | Type | Description | Example |
| - | - | - | - |
| `name` | string | Release name | `name ~ "v2"` |
| `description` | string | Release description | `description ~ "hotfix"` |
| `scope` | string | Release scope | `scope = "backend"` |
| `status` | enum | planned, active, released | `status = active` |
| `start_date` | date | Planned start date | `start_date >= 2024-01-01` |
| `end_date` | date | Planned end date | `end_date <= +30d` |
| `created_at` | datetime | When created | `created_at >= -30d` |
| `updated_at` | datetime | Last modified | `updated_at >= startOfWeek()` |
| `created_by` | string | Creator user ID | `created_by = "user_123"` |
| `sprint_count` | number | Number of sprints | `sprint_count > 0` |
| `build_count` | number | Number of builds | `build_count >= 5` |

## Environment Fields

| Field | Type | Description | Example |
| - | - | - | - |
| `name` | string | Environment name | `name ~ "staging"` |
| `description` | string | Description | `description ~ "production"` |
| `endpoint_url` | string | Environment URL | `endpoint_url ~ "api.example.com"` |
| `type` | enum | development, staging, production | `type = production` |
| `created_at` | datetime | When created | `created_at >= -90d` |
| `updated_at` | datetime | Last modified | `updated_at >= -7d` |
| `deployment_count` | number | Number of deployments | `deployment_count > 0` |

## Build Fields

| Field | Type | Description | Example |
| - | - | - | - |
| `version` | string | Build version | `version ^ "2.1"` |
| `git_sha` | string | Git commit SHA | `git_sha ^ "abc123"` |
| `scope` | string | Build scope | `scope = "frontend"` |
| `status` | enum | pending, active, archived | `status = active` |
| `created_at` | datetime | When created | `created_at >= -7d` |
| `updated_at` | datetime | Last modified | `updated_at >= -1d` |
| `release` | string | Parent release name | `release ~ "v2"` |
| `sprint` | string | Parent sprint name | `sprint ~ "Sprint 5"` |
| `deployed_to` | array | Deployed environments | `deployed_to CONTAINS "staging"` |

## Sprint Fields

| Field | Type | Description | Example |
| - | - | - | - |
| `number` | number | Sprint number | `number >= 5` |
| `name` | string | Sprint name | `name ~ "Sprint 10"` |
| `scope` | string | Sprint scope | `scope = "backend"` |
| `status` | enum | planned, active, completed | `status = active` |
| `start_date` | date | Sprint start | `start_date >= -14d` |
| `end_date` | date | Sprint end | `end_date <= +7d` |
| `created_at` | datetime | When created | `created_at >= -30d` |
| `release` | string | Parent release name | `release ~ "v3"` |

## Test Run Fields

### Run Metadata

| Field | Type | Description | Example |
| - | - | - | - |
| `name` | string | Run name | `name ~ "nightly"` |
| `description` | string | Run description | `description ~ "regression"` |
| `run_type` | enum | manual, automated | `run_type = automated` |
| `status` | enum | planned, in\_progress, completed, aborted | `status = completed` |
| `assigned_to` | string | Assigned user | `assigned_to = "user_123"` |
| `created_by` | string | Creator | `created_by = "user_123"` |

### Run Timing

| Field | Type | Description | Example |
| - | - | - | - |
| `planned_start` | datetime | Planned start | `planned_start >= -7d` |
| `planned_end` | datetime | Planned end | `planned_end IS NOT NULL` |
| `actual_start` | datetime | Actual start | `actual_start >= -24h` |
| `actual_end` | datetime | Actual end | `actual_end IS NOT NULL` |
| `created_at` | datetime | When created | `created_at >= startOfWeek()` |
| `updated_at` | datetime | Last modified | `updated_at >= -1d` |

## Field Type Details

### String Fields

Case-insensitive by default. Use pattern operators:

```oql theme={null}
title ~ "login"           # Contains
title ^ "TC-"            # Starts with
title $ "test"           # Ends with
```

### Enum Fields

Use exact values or IN for multiple:

```oql theme={null}
status = ready
priority IN (p1, p2)
test_type = automated
```

### Number Fields

Support comparison operators:

```oql theme={null}
sprint_count > 0
build_count >= 5
number BETWEEN 1 AND 10
```

### Boolean Fields

```oql theme={null}
# Use IS NULL / IS NOT NULL for optional fields
owner IS NOT NULL
archived_at IS NULL
```

### Datetime Fields

Support ISO dates and relative dates:

```oql theme={null}
created_at = "2024-01-15"
created_at >= -7d
created_at >= startOfMonth()
updated_at >= startOfWeek()
```

### Array Fields

Support contains operations:

```oql theme={null}
tags CONTAINS "smoke"
tags CONTAINS ANY (smoke, regression)
tags CONTAINS ALL (smoke, critical)
deployed_to CONTAINS "staging"
```

> [!NOTE]
>
> Custom fields are also searchable using dot notation:
>
> ```oql theme={null}
> custom_fields.jira_ticket = "PROJ-123"
> ```

## Tips

> [!TIP]
>
> Not sure what field to use? Ask the AI:
>
> ```
> What fields can I search for automated tests?
> ```
>
> The AI will suggest appropriate fields and show examples.

## What's Next?

> [card] [Query Examples](https://onetest.ai/oql/examples.md)
>
> Real-world query examples

> [card] [Syntax Reference](https://onetest.ai/oql/syntax.md)
>
> Complete OQL syntax


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.