Hello,
I've tried to remove line (org-inhibit-logging t) locally, it have solved my problem partially.

If I clock-in and then clock-out the same headline everything is ok (Task 1 in my example)
. But if I clock-in Task 2, Then go to Task 3 and ckock it in, Task 2 clocked out and have only CLOSED log entry, but it doesn't have log about change state from PROGRESS to DONE.

Example:

* DONE Task 1
CLOSED: [2017-07-29 Sat 16:45]
:LOGBOOK:
- State "DONE"       from "PROGRESS"   [2017-07-29 Sat 16:45]
- State "PROGRESS"   from "TODO"       [2017-07-29 Sat 16:45]
CLOCK: [2017-07-29 Sat 16:45]--[2017-07-29 Sat 16:45] =>  0:00
:END:

* DONE Task 2
CLOSED: [2017-07-29 Sat 16:45]
:LOGBOOK:
- State "PROGRESS"   from "TODO"       [2017-07-29 Sat 16:45]
CLOCK: [2017-07-29 Sat 16:45]--[2017-07-29 Sat 16:45] =>  0:00
:END:

* PROGRESS Task 3
:LOGBOOK:
- State "PROGRESS"   from "TODO"       [2017-07-29 Sat 16:45]
CLOCK: [2017-07-29 Sat 16:45]
:END:


2017-07-28 16:44 GMT+03:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:
Hello,

Рома Рудаков <phentagram@gmail.com> writes:

> Expected result:
>
> * DONE task 1
>   CLOSED: [2017-07-26 Wed 15:39]
>   :LOGBOOK:
>   - State "DONE"       from "PROGRESS"   [2017-07-26 Wed 15:39]
>   - State "PROGRESS"   from "TODO"       [2017-07-26 Wed 15:37]
>   CLOCK: [2017-07-26 Wed 15:37]--[2017-07-26 Wed 15:38] =>  0:01
>   :END:
> * TODO task 2
> * TODO task 3
> * TODO task 4
>
>
> Actual result:
>
> * DONE task 1
>   :LOGBOOK:
>   - State "PROGRESS"   from "TODO"       [2017-07-26 Wed 15:37]
>   CLOCK: [2017-07-26 Wed 15:37]--[2017-07-26 Wed 15:38] =>  0:01
>   :END:
> * TODO task 2
> * TODO task 3
> * TODO task 4
>
> There is no CLOSED log entry and change state from PROGRESS to DONE
> entry.

Logging was inhibited when using `org-clock-out-switch-to-state', but
not when using `org-clock-in-switch-to-state'. I assume this is a bug,
so I removed it.

I may be wrong though, so this change is in master only.

Thank you.

Regards,

--
Nicolas Goaziou