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 vote

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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

69 views 0 5
Read article

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