TenantAtlas/specs/010-admin-templates/plan.md
ahmido 61b0b1bc23 feat(010): Administrative Templates – restore from PolicyVersion + version visibility (#13)
Problem: Restore nutzt bisher den Snapshot aus dem BackupSet (BackupItem). Wenn der Snapshot “unvollständig”/nicht der gewünschte Stand ist, landen nach Restore nur wenige Admin-Template-Settings in Intune.
Lösung:
Neue Action “Restore to Intune” direkt an einer konkreten PolicyVersion (inkl. Dry-Run Toggle) → reproduzierbarer Rollback auf exakt diese Version.
Restore-UI zeigt jetzt PolicyVersion-Nummer (version: X) in der Item-Auswahl + BackupSet Items Tabelle hat eine Version-Spalte.
Implementierung:
RestoreService::executeFromPolicyVersion() erzeugt dafür einen kleinen, temporären BackupSet+BackupItem aus der Version und startet einen normalen RestoreRun.
Pest-Test: PolicyVersionRestoreToIntuneTest.php
Specs/TODO:
Offene Follow-ups sind dokumentiert in tasks.md unter “Open TODOs (Follow-up)”.
QA (GUI):
Inventory → Policies → <Policy> → Versions → Restore to Intune (erst Dry-Run, dann Execute)
Backups & Restore → Restore Runs → Create (bei Items steht version: X)
Backups & Restore → Backup Sets → <Set> (Version-Spalte)
Tests: PolicyVersionRestoreToIntuneTest.php

Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local>
Reviewed-on: #13
2025-12-30 01:50:05 +00:00

990 B

Implementation Plan: Administrative Templates (010)

Branch: feat/010-admin-templates
Date: 2025-12-29
Spec Source: spec.md

Summary

Make groupPolicyConfiguration snapshots/restores accurate by hydrating and applying definitionValues and their presentationValues, and present a readable normalized view in Filament.

Execution Steps

  1. Graph contract updates
    • Add subresource/hydration metadata for definitionValues + presentationValues.
  2. Snapshot capture hydration
    • Extend PolicySnapshotService to hydrate Admin Template settings into the payload.
  3. Restore
    • Extend RestoreService to “wipe and replace” definitionValues/presentationValues from snapshot.
  4. UI normalization
    • Add a normalizer that renders configured settings as readable rows.
  5. Tests + formatting
    • Add targeted Pest tests for snapshot hydration, normalized display, and restore.
    • Run ./vendor/bin/pint --dirty and the affected tests.