How to change ticket state before closing ticket?

and i make it more complicated… hmmm…
i could be better if i use this way: