feat: complete Nextcloud Deck integration with English emoji stack names

- Renamed all stacks to English with emojis (Backlog, Planning, In Progress, Complete)
- Updated sync script to use new stack names
- Created all 3 initiative cards (IDs 189-191)
- Enhanced error handling with detailed debug output
- Updated documentation with API limitations and troubleshooting
- Fixed stack fallback from 'eingang' to '📥 Backlog'

Changes:
- scripts/sync-roadmap-to-deck.py: Updated STATUS_TO_STACK mapping, added verbose logging
- docs/NEXTCLOUD_DECK_SYNC.md: Updated stack table, added Known Limitations section, enhanced troubleshooting

Note: 6 duplicate/test cards (184-188, 192) must be deleted manually from Nextcloud UI
      due to API limitations (DELETE returns 405)
This commit is contained in:
mindesbunister
2025-11-14 11:25:09 +01:00
parent 77a22bae3f
commit a49db192f4
2 changed files with 74 additions and 25 deletions

View File

@@ -32,14 +32,14 @@ STACKS = {stack['name']: stack['id'] for stack in DECK_CONFIG['stacks']}
# Status to stack mapping
STATUS_TO_STACK = {
'IN PROGRESS': 'in arbeit',
'🔄 IN PROGRESS': 'in arbeit',
'COMPLETE': 'erledigt',
'✅ COMPLETE': 'erledigt',
'PENDING': 'in planung',
'🔜 NEXT': 'in planung',
'FUTURE': 'eingang',
'🎯 FUTURE': 'eingang',
'IN PROGRESS': '🚀 In Progress',
'🔄 IN PROGRESS': '🚀 In Progress',
'COMPLETE': '✅ Complete',
'✅ COMPLETE': '✅ Complete',
'PENDING': '📋 Planning',
'🔜 NEXT': '📋 Planning',
'FUTURE': '📥 Backlog',
'🎯 FUTURE': '📥 Backlog',
}
# Roadmap files to parse
@@ -133,8 +133,8 @@ class RoadmapParser:
content = filepath.read_text()
tasks = []
# Parse initiatives (main sections)
initiative_pattern = r'## 🎯 Initiative (\d+): (.+?)(?=\n##|\Z)'
# Parse initiatives (main sections) - handle different emoji prefixes
initiative_pattern = r'## (?:🎯|📐|📊) Initiative (\d+): (.+?)(?=\n##|\Z)'
initiatives = re.finditer(initiative_pattern, content, re.DOTALL)
for initiative in initiatives:
@@ -247,25 +247,39 @@ def sync_roadmap_to_deck(dry_run: bool = False):
title = task['title']
# Create new card
stack_name = STATUS_TO_STACK.get(task['status'], 'eingang')
stack_id = STACKS[stack_name]
stack_name = STATUS_TO_STACK.get(task['status'], '📥 Backlog')
# Debug output
print(f"✨ Create: {title}")
print(f" Stack: {stack_name}")
print(f" Status from roadmap: {task['status']!r}")
print(f" Mapped to stack: {stack_name!r}")
if stack_name not in STACKS:
print(f" ❌ ERROR: Stack {stack_name!r} not found in STACKS")
print(f" Available stacks: {list(STACKS.keys())}")
skipped += 1
continue
stack_id = STACKS[stack_name]
print(f" Stack ID: {stack_id}")
if task['progress']:
print(f" Progress: {task['progress']}")
if not dry_run:
try:
api.create_card(
result = api.create_card(
stack_id=stack_id,
title=title,
description=task['description'],
due_date=task['due_date'],
)
print(f" ✅ Created card ID: {result['id']}")
created += 1
except Exception as e:
print(f" ❌ Error: {e}")
import traceback
traceback.print_exc()
skipped += 1
else:
created += 1