The "Comment Required" validator does not behave the way I want it to. Anyone have any hints?

Hi,

I use a validator in my custom workflow, to require a comment in order for a user to perform a particular transition. I use a standard validator for that. I have set no screen for this transition.

When I trigger that transition, I immediately get the following error, even if I enter a comment in the standard "comment" field of that ticket.

Of the below error in a popup, the first line is the text I defined in the workflow. The other two lines about illegal operation and contacting the JIRA admin are from the JIRA standard, I believe.

"Use the comment field specify what action or information you require from the reporter.

It seems that you have tried to perform an illegal workflow operation.

If you think this message is wrong, please contact your JIRA administrators."

Am I using this validator wrongly?

Thanks,
takeshi

2 answers

This widget could not be displayed.

Since you have no transition screen, there is no way for the workflow to associate any field updates with that transition, which is why it throws errors saying you've performed "an illegal operation." If you add a transition screen (even if it only has the Comment field visible), does that fix the issue?

To expand on what Tyler has said. To create a comment screen, you just need to create a screen, and put no fields on it. The comment is automatically added to the screen by JIRA. I know, it seems counterintutive but it does work, trust me.

Now when you add the comment screen to your workflow transition, it will display only a comment field. Enter your comment there and your validation should now work.

This widget could not be displayed.

Another way you could do this, assuming that you just want to have at least 1 comment on the issue, regardless of when it was added, is create a custom field of type "number of comments". Then have a validator to check that this field has a value greater then 0.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

575 views 25 15
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you