@startuml uml-state-major-incident !include _style.iuml title 10. State machine — Major Incident (estado_mim) [*] --> open : declarar(severidad, descripcion) / publicado_por open --> mitigated : mitigar(workaround) / publica update mitigated --> resolved : resolver(causa_raiz) / cero tickets vinculados abiertos resolved --> post_mortem : iniciar_pir() / habilita campo pir_url post_mortem --> [*] : publicar_pir(url) [pir_url requerido] note right of open Estado inicial al declarar el MIM (006_support_itsm.sql:82, DEFAULT 'declarado'). Mapea a 'declarado' en el ENUM. end note note right of mitigated Workaround activo. Equivale al estado 'mitigando' del ENUM. end note note right of resolved Causa raiz documentada. Mapea a 'resuelto' del ENUM. end note note left of post_mortem Estado 'pir_pendiente'. El trigger trg_mim_block_close_if_open_tickets (006_support_itsm.sql:643) impide cerrar sin pir_url y sin tickets vinculados resueltos. end note footer Fuente: ENUM estado_mim 006_support_itsm.sql:82 | tabla major_incidents 006_support_itsm.sql:374 | trigger mim_block_close_trigger @enduml