108 lines
2.9 KiB
Markdown
108 lines
2.9 KiB
Markdown
# Workorder Collection Attribute beheben
|
|
|
|
Der Fehler "Unknown attribute: 'status'" bedeutet, dass das Attribut `status` in deiner `workorders` Collection fehlt.
|
|
|
|
## Problem
|
|
|
|
Die Collection `workorders` (ID: `6943bf7d001901baa60c`) hat nicht alle benötigten Attribute.
|
|
|
|
## Lösung: Attribute hinzufügen
|
|
|
|
1. Gehe zu `https://appwrite.webklar.com`
|
|
2. Öffne dein Projekt **woms**
|
|
3. Gehe zu **Databases** → **woms-database** → **workorders**
|
|
4. Klicke auf **Attributes** Tab
|
|
5. Füge die fehlenden Attribute hinzu:
|
|
|
|
### Erforderliche Attribute (Required):
|
|
|
|
| Attribut Name | Typ | Größe | Required | Default |
|
|
|--------------|-----|-------|----------|---------|
|
|
| `topic` | string | 255 | ✓ | - |
|
|
| `status` | string | 50 | ✓ | `Open` |
|
|
| `priority` | integer | - | ✓ | `1` |
|
|
|
|
### Optionale Attribute:
|
|
|
|
| Attribut Name | Typ | Größe | Required |
|
|
|--------------|-----|-------|----------|
|
|
| `type` | string | 50 | - |
|
|
| `systemType` | string | 50 | - |
|
|
| `responseLevel` | string | 50 | - |
|
|
| `serviceType` | string | 50 | - |
|
|
| `customerId` | string | 50 | - |
|
|
| `customerName` | string | 255 | - |
|
|
| `customerLocation` | string | 255 | - |
|
|
| `requestedBy` | string | 255 | - |
|
|
| `requestedFor` | string | 255 | - |
|
|
| `startDate` | string | 50 | - |
|
|
| `startTime` | string | 10 | - |
|
|
| `deadline` | string | 50 | - |
|
|
| `endTime` | string | 10 | - |
|
|
| `estimate` | string | 50 | - |
|
|
| `mailCopyTo` | string | 255 | - |
|
|
| `sendNotification` | boolean | - | - |
|
|
| `details` | string | 10000 | - |
|
|
| `assignedTo` | string | 50 | - |
|
|
| `assignedName` | string | 255 | - |
|
|
| `approvalStatus` | string | 50 | - |
|
|
| `woid` | string | 50 | - |
|
|
| `createdAt` | datetime | - | - |
|
|
|
|
## Schritt-für-Schritt
|
|
|
|
### 1. Status hinzufügen (wichtig!)
|
|
|
|
1. Klicke auf **Create Attribute**
|
|
2. **Key**: `status`
|
|
3. **Type**: `String`
|
|
4. **Size**: `50`
|
|
5. **Required**: ✓ (aktivieren)
|
|
6. **Default**: `Open`
|
|
7. **Array**: Nein
|
|
8. Klicke auf **Create**
|
|
|
|
### 2. Priority hinzufügen (wichtig!)
|
|
|
|
1. Klicke auf **Create Attribute**
|
|
2. **Key**: `priority`
|
|
3. **Type**: `Integer`
|
|
4. **Required**: ✓ (aktivieren)
|
|
5. **Default**: `1`
|
|
6. Klicke auf **Create**
|
|
|
|
### 3. Topic hinzufügen (wichtig!)
|
|
|
|
1. Klicke auf **Create Attribute**
|
|
2. **Key**: `topic`
|
|
3. **Type**: `String`
|
|
4. **Size**: `255`
|
|
5. **Required**: ✓ (aktivieren)
|
|
6. Klicke auf **Create**
|
|
|
|
### 4. Weitere Attribute hinzufügen
|
|
|
|
Wiederhole den Prozess für alle anderen Attribute aus der Liste oben.
|
|
|
|
## Überprüfung
|
|
|
|
Nach dem Hinzufügen aller Attribute:
|
|
|
|
1. Stelle sicher, dass mindestens diese drei Attribute existieren:
|
|
- ✓ `topic` (string, required)
|
|
- ✓ `status` (string, required, default: "Open")
|
|
- ✓ `priority` (integer, required, default: 1)
|
|
|
|
2. Versuche erneut, ein Ticket zu erstellen
|
|
|
|
## Wenn Attribute bereits existieren
|
|
|
|
Falls die Attribute bereits existieren, aber andere Namen haben:
|
|
|
|
1. Überprüfe die Attributnamen in Appwrite
|
|
2. Teile mir die tatsächlichen Attributnamen mit
|
|
3. Ich passe den Code entsprechend an
|
|
|
|
Viel Erfolg! 🚀
|
|
|