org-after-todo-state-change-hook

org-after-todo-state-change-hook is a variable defined in `org.el'.
Its value is
(org-clock-out-if-current)

Original value was

  • This variable may be risky if used as a file-local variable.

Documentation:
Hook which is run after the state of a TODO item was changed.
The new state (a string with a TODO keyword, or nil) is available in the
Lisp variable `org-state'.

You can customize this variable.