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

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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,420 views 15 19
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