Workflow Validator - Require comment when field is filled

Hi there,

we need to set comment to mandatory when the field "Flagged" is marked. Tried this based on the current groovy documentation, but this is not working as the variable is not declared...

cfValues['Flagged'] || transientVars["comment"]

image2017-1-11 15:41:2.png

Maybe not a big thing, but how to solve?

Best regards,

Hans-Hermann

2 answers

0 votes

cfValues is only available in Simple Scripted Validator IIRC. That said there seems to be a bug in the type-checking. It's marked as an error but works fine: https://productsupport.adaptavist.com/browse/SRJIRA-2101

Hi Jamie,

thanks for the update, but it seems that it´s not working. I could transition an issue with field "Flagged" being marked but added no comment, JIRA accepted it and updated the status. My expectation was to being blocked until a comment was added.

Did i configure something wrong?

Thanks & best regards,

Hans-Hermann

Well you are saying "Flagged" OR "with a comment". Do you want to say if it's flagged it must have a comment? Do you want the comment to be required when the issue is first flagged, or every transition thereafter?

The transitions should be blocked in case the field "Flagged" is marked during this transition and no comment was added (as explanation why the flag has been set).

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,877 views 12 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot