@startuml
start
:User executes command;

'Since the beta syntax does not support placing the condition outside the
'diamond we place it as the true branch instead.

if () then ([index valid])
    :Fetch the event to be edited;


    if () then ([no field provided])

    else ([else])
        if () then ([end date time provided
AND end date time passed])
        else ([else])
            :Create edited event;
            if () then ([edited event same
as any existing events])
            else ([else])
            :Replace with edited event;
            endif
        endif
    endif
else ([else])
endif
stop
@enduml
