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

# Reported Defects

> Defect reports submitted through A7 Reporter, and their delivery to the maintenance system.

Every report started in the [reporter app](https://docs.a7manager.se/pages/reporter-app.md), with its status and its
delivery to the maintainer's system. The Swedish label is **Skaderapporter**, under the
**Skaderapportering** section of the sidebar.

***

## The list

| Column | Shows |
| - | - |
| **Status** | `DRAFT`, `SUBMITTED`, `SYNCED` or `ARCHIVED` |
| **Delivery** | The delivery status: `PENDING`, `IN_PROGRESS`, `SENT` or `FAILED`. Empty until submitted |
| **Vehicle**, **Title**, **Severity** | As reported |
| **Reporter** | Who wrote the report |
| **Submitted** | When it was first submitted |
| **External ID** | The identifier the maintainer's system returned |
| **Defect time**, **Created** | Hidden by default |

The grid filters on status, delivery status, vehicle and reporter, and searches title,
description and vehicle number.

***

## Report lifecycle

```mermaid theme={null}
stateDiagram-v2
    [*] --> DRAFT: started in the app
    DRAFT --> SUBMITTED: submit
    SUBMITTED --> SYNCED: delivered
    DRAFT --> ARCHIVED: idle 30 days
    SYNCED --> [*]
```

| Status | Meaning |
| - | - |
| `DRAFT` | Being written in the app |
| `SUBMITTED` | A `defect` row exists and delivery is queued. The report is read-only |
| `SYNCED` | Delivered to the maintainer's system. The report can no longer change |
| `ARCHIVED` | A draft abandoned for 30 days |

***

## Detail

Clicking a row opens the report: description, asset, classification, diagnostic codes, and
the delivery record.

| Delivery field | Meaning |
| - | - |
| Adapter | Which [integration](https://docs.a7manager.se/platform/maintainer-integration.md) delivers the report |
| Attempts | Attempts made, out of the maximum of five |
| Next attempt | When the next automatic attempt is due |
| Sent | When delivery succeeded |
| External ID | The identifier the maintainer's system returned |
| Correlation ID | Sent with every attempt, so the two systems' logs can be matched |
| Last error | The reason the most recent attempt failed |

**Open defect** opens the `defect` row the report created.

### Retry

A delivery that is pending or failed, and has no external identifier, can be retried. Retry
resets the attempt count and delivers once, immediately. It is refused when the report has
already been delivered or an attempt is running.

### Transcript

The **Transcript** tab shows the whole conversation: the reporter's messages, the
assistant's replies, and every direct edit made on the report sheet.

***

## Submitted reports become defects

Submitting a report writes a row in the `defect` table straight away, so the fault appears
on [Defects](https://docs.a7manager.se/pages/defects.md) and in the KPIs before it reaches the maintainer.

The row is identified by `external_system_id = APP-` followed by 12 hexadecimal characters.
When the maintainer's system accepts the report and returns its own identifier, the row's
`external_system_id` is replaced by that identifier. From then on the maintainer's daily
[defect file](https://docs.a7manager.se/data/files/defects.md) updates the row like any other imported defect, because
the import matches on `external_system_id` within the project: closing date, cause and
action arrive through the import.

> [!NOTE]
>
> The import overwrites the row only when the file's `external_updated_at` is later than the
> time of delivery, which is when the row was last written.

With no maintainer integration enabled, reports are delivered to the log adapter, which
returns no identifier. The defect keeps its `APP-` identifier and no import ever matches it.

***

## Tables

> **[Field reference](https://docs.a7manager.se/data/tables/reporting.md)**
>
> `reporting_defect_report`, `reporting_report_session`, `reporting_report_message` and
> `integrations_outbound_sync`.

***

## Roles

| Role | Capabilities |
| - | - |
| **Asset Manager** | See every report in the project, its delivery record, and the defect it created |
| **Project Admin** | Also retry a delivery and read the transcript |
| **Defect Reporter** | Has no access to this page. Reporters work in the [reporter app](https://docs.a7manager.se/pages/reporter-app.md) and see only their own reports |


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