To require to comment issue when its state is changing by user
Hello,
The workflow I need to realize is to require a user to comment changing of issues`s state.
For example, user changes state of issue from "In progress" to "Fixed". And in this case Youtrack have to require a user to describe why he decided to fix issue at changing issue state moment in spite on is issue commented or not.
The way I found is to write:
And I got some problems of Youtrack behaviour:
1. If issue hasn`t any comments.
I change issue`s state and get command window with predetermined invalid command "comments". (screenshot attached)
2. If issue has some comments.
I change issue`s state and get nothing.
As I understand the good way for my task is next case:
Irrespective of has issue comments or not, to open command window with predetermined valid command 'comment'
How I can do it?
Workflow 4.2 (build #55.5851 [build on 13 Feb 2013])
YouTrack 4.1.3 (build #5764 [17-Jan-2013 15:55] )
The workflow I need to realize is to require a user to comment changing of issues`s state.
For example, user changes state of issue from "In progress" to "Fixed". And in this case Youtrack have to require a user to describe why he decided to fix issue at changing issue state moment in spite on is issue commented or not.
The way I found is to write:
issue.comments.required("Please, comment the reason to transit issue state");
And I got some problems of Youtrack behaviour:
1. If issue hasn`t any comments.
I change issue`s state and get command window with predetermined invalid command "comments". (screenshot attached)
2. If issue has some comments.
I change issue`s state and get nothing.
As I understand the good way for my task is next case:
Irrespective of has issue comments or not, to open command window with predetermined valid command 'comment'
How I can do it?
Workflow 4.2 (build #55.5851 [build on 13 Feb 2013])
YouTrack 4.1.3 (build #5764 [17-Jan-2013 15:55] )
Please sign in to leave a comment.

Unfortunately it's not possible yet, please vote/comment the http://youtrack.jetbrains.com/issue/JT-10337.
But you can implement the workaround:
rule Require comment on w/o verification when State.becomes({Without verification}) { assert comments.added.isNotEmpty: "Please add comment in Command Window"; }If you change the state by the command in the Command Window then you can add a comment in the same transaction.
Unfortunately, this rule based on your workaround doesn`t allow change state of issue anyway.
I wrote this rule in my worflow. Attach this my workflow to my project. Try change state of issue to "Fixed", Youtrack show me message "Please comment a reason!" and state isn`t changed. I comment issue and try to change state again. Youtrack show me message "Please comment a reason!" and state isn`t changed. And so on.... And I can`t change state to "Fixed" in any case! It doesn`t work (
This method is not suitable for us.