Hola Atlassians,
I have seen several cases of adding a postfunction and/or using ScriptRunner to add a comment automatically after doing a transition, but my case scenario is different.
I have a workflow transition "Rejected", which moves a ticket's status to "Rejected"
That transition screen has 2 fields - a "Rejection reason", and a "comment"
Depending on the "Rejection reason", I want to populate the comment with a pre-defined template,
AND I want to show an error if the comment was not edited (i.e. comment === comment_template)
Example:
Rejection reason: Not reproducible
Comment template:
"""
Status: Failed
Error: Unable to reproduce the error.
Tested on version: {{VERSION}}
"""
and if the final comment matches the Comment Template, user shouldn't be able to go through the transition, and actually show an error "Comment not edited".
I would appreciate your support on that, hoping to find a proper solution for this problem.
Thank you!