I want to track time I've spent on a single issue in my JetBrains YouTrack Cloud in such a way, that I declare work on a specific issue and YouTrack is dealing with time tracking by itself. When I consider issue as done YouTrack stops tracking time and I get value of time spent on the issue.
Is it possible? I've read the documentation and dig deep in the internet, but couldn't find a solution.
For now I only managed to set Estimation and Spent Time fields for issues, but values for both are set manually.
It seems you are looking for functionality similar to the In Progress Work Timer workflow. It automatically starts a timer when the issue's State field value is changed to "In progress" and stops when the State becomes "Resolved".
Here you can read how to include workflows to the project: Attach a Workflow to your Project.