Blocking creation of an issue if more than one component selected

Nelson Nauss May 6, 2013

I am trying to block the creation of an issue if more than one component is selected. Using the Groovy Script Runner validator on the create transition, I have tried he following conditions, but neither have worked:

  • issue.get("components").size() > 1
  • issue.components.size > 1

Any suggestions?

1 answer

1 accepted

1 vote
Answer accepted
Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2013

Did you tried?

issue.componentObjects.size()

Henning

Nelson Nauss May 6, 2013
I set the condition to the following...

issue.getComponentObjects().size() == 1

...and it worked great! Thanks Henning.

Suggest an answer

Log in or Sign up to answer