Updated functionality to add comment when changing the state of an issue.
Long story.