An incident remediation report can count visible tickets at a selected severity threshold and assign the queue to a fixed owner group.

Program

Play the program to choose minimum severity and inspect the owner report.

min_severity
incident_owner_report.f90
Replay: real traced execution (multi-file project)
program incident_owner_report_demo
    implicit none
    integer :: severities(4)
    integer :: min_severity
    integer :: visible_count
    integer :: i
    character(len=8) :: owner

    severities = [1, 2, 3, 3]
    min_severity = 2
    visible_count = 0
    do i = 1, 4
        if (severities(i) >= min_severity) then
            visible_count = visible_count + 1
        end if
    end do
    if (visible_count >= 3) then
        owner = 'ops'
    else
        owner = 'lead'
    end if
    print '(A, I0, 1X, A, I0, 1X, A)', 'min=', min_severity, 'visible=', visible_count, trim(owner)
end program incident_owner_report_demo
program incident_owner_report_demo
    implicit none
    integer :: severities(4)
    integer :: min_severity
    integer :: visible_count
    integer :: i
    character(len=8) :: owner

    severities = [1, 2, 3, 3]
    min_severity = 1
    visible_count = 0
    do i = 1, 4
        if (severities(i) >= min_severity) then
            visible_count = visible_count + 1
        end if
    end do
    if (visible_count >= 3) then
        owner = 'ops'
    else
        owner = 'lead'
    end if
    print '(A, I0, 1X, A, I0, 1X, A)', 'min=', min_severity, 'visible=', visible_count, trim(owner)
end program incident_owner_report_demo
program incident_owner_report_demo
    implicit none
    integer :: severities(4)
    integer :: min_severity
    integer :: visible_count
    integer :: i
    character(len=8) :: owner

    severities = [1, 2, 3, 3]
    min_severity = 3
    visible_count = 0
    do i = 1, 4
        if (severities(i) >= min_severity) then
            visible_count = visible_count + 1
        end if
    end do
    if (visible_count >= 3) then
        owner = 'ops'
    else
        owner = 'lead'
    end if
    print '(A, I0, 1X, A, I0, 1X, A)', 'min=', min_severity, 'visible=', visible_count, trim(owner)
end program incident_owner_report_demo
  1. severities ← [1, 2, 3, 3]

    9severities = [1, 2, 3, 3]10min_severity = 2
    values this step[1, 2, 3, 3]severities
  2. min_severity ← 2

    9severities = [1, 2, 3, 3]10min_severity = 211visible_count = 0
    values this step2min_severity
  3. visible_count ← 0

    10min_severity = 211visible_count = 012do i = 1, 4
    values this step0visible_count
  4. i ← 1

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step1i
  5. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.false.severities(1) >= min_severity
  6. i ← 2

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step2i
  7. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.true.severities(2) >= min_severity
  8. visible_count ← 1

    13if (severities(i) >= min_severity) then14    visible_count = visible_count + 115end if
    values this step1visible_count
  9. i ← 3

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step3i
  10. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.true.severities(3) >= min_severity
  11. visible_count ← 2

    13if (severities(i) >= min_severity) then14    visible_count = visible_count + 115end if
    values this step2visible_count
  12. i ← 4

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step4i
  13. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.true.severities(4) >= min_severity
  14. visible_count ← 3

    13if (severities(i) >= min_severity) then14    visible_count = visible_count + 115end if
    values this step3visible_count
  15. if (visible_count >= 3) then

    16end do17if (visible_count >= 3) then18    owner = 'ops'
    values this step3visible_count
  16. owner ← ops

    17if (visible_count >= 3) then18    owner = 'ops'19else
    values this stepopsowner
  17. print '(A, I0, 1X, A, I0, 1X, A)', 'min=', min_severity, 'visible=', v…

    21    end if22    print '(A, I0, 1X, A, I0, 1X, A)', 'min=', min_severity, 'visible=', visible_count, trim(owner)23end program incident_owner_report_demo
    outputmin=2 visible=3 ops
    values this step2min_severity3visible_countopsowner
  1. severities ← [1, 2, 3, 3]

    9severities = [1, 2, 3, 3]10min_severity = 1
    values this step[1, 2, 3, 3]severities
  2. min_severity ← 1

    9severities = [1, 2, 3, 3]10min_severity = 111visible_count = 0
    values this step1min_severity
  3. visible_count ← 0

    10min_severity = 111visible_count = 012do i = 1, 4
    values this step0visible_count
  4. i ← 1

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step1i
  5. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.true.severities(1) >= min_severity
  6. visible_count ← 1

    13if (severities(i) >= min_severity) then14    visible_count = visible_count + 115end if
    values this step1visible_count
  7. i ← 2

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step2i
  8. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.true.severities(2) >= min_severity
  9. visible_count ← 2

    13if (severities(i) >= min_severity) then14    visible_count = visible_count + 115end if
    values this step2visible_count
  10. i ← 3

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step3i
  11. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.true.severities(3) >= min_severity
  12. visible_count ← 3

    13if (severities(i) >= min_severity) then14    visible_count = visible_count + 115end if
    values this step3visible_count
  13. i ← 4

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step4i
  14. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.true.severities(4) >= min_severity
  15. visible_count ← 4

    13if (severities(i) >= min_severity) then14    visible_count = visible_count + 115end if
    values this step4visible_count
  16. if (visible_count >= 3) then

    16end do17if (visible_count >= 3) then18    owner = 'ops'
    values this step4visible_count
  17. owner ← ops

    17if (visible_count >= 3) then18    owner = 'ops'19else
    values this stepopsowner
  18. print '(A, I0, 1X, A, I0, 1X, A)', 'min=', min_severity, 'visible=', v…

    21    end if22    print '(A, I0, 1X, A, I0, 1X, A)', 'min=', min_severity, 'visible=', visible_count, trim(owner)23end program incident_owner_report_demo
    outputmin=1 visible=4 ops
    values this step1min_severity4visible_countopsowner
  1. severities ← [1, 2, 3, 3]

    9severities = [1, 2, 3, 3]10min_severity = 3
    values this step[1, 2, 3, 3]severities
  2. min_severity ← 3

    9severities = [1, 2, 3, 3]10min_severity = 311visible_count = 0
    values this step3min_severity
  3. visible_count ← 0

    10min_severity = 311visible_count = 012do i = 1, 4
    values this step0visible_count
  4. i ← 1

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step1i
  5. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.false.severities(1) >= min_severity
  6. i ← 2

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step2i
  7. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.false.severities(2) >= min_severity
  8. i ← 3

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step3i
  9. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.true.severities(3) >= min_severity
  10. visible_count ← 1

    13if (severities(i) >= min_severity) then14    visible_count = visible_count + 115end if
    values this step1visible_count
  11. i ← 4

    11visible_count = 012do i = 1, 413    if (severities(i) >= min_severity) then
    values this step4i
  12. if (severities(i) >= min_severity) then

    12do i = 1, 413    if (severities(i) >= min_severity) then14        visible_count = visible_count + 1
    values this step.true.severities(4) >= min_severity
  13. visible_count ← 2

    13if (severities(i) >= min_severity) then14    visible_count = visible_count + 115end if
    values this step2visible_count
  14. if (visible_count >= 3) then

    16end do17if (visible_count >= 3) then18    owner = 'ops'
    values this step2visible_count
  15. owner ← lead

    19else20    owner = 'lead'21end if
    values this stepleadowner
  16. print '(A, I0, 1X, A, I0, 1X, A)', 'min=', min_severity, 'visible=', v…

    21    end if22    print '(A, I0, 1X, A, I0, 1X, A)', 'min=', min_severity, 'visible=', visible_count, trim(owner)23end program incident_owner_report_demo
    outputmin=3 visible=2 lead
    values this step3min_severity2visible_countleadowner
visible count The loop counts incidents at or above the selected severity threshold.
owner label The owner is derived from the visible workload rather than from host state.
remediation row The final output keeps threshold, count, and owner in one report line.