"Simple scripted validator" is not working

Precondition:
We have uploaded roovy Script Runner plugin.

Steps:
1. Open workflow in edit mode and select first transition "Create issue".screen3_script.png
2. Go to "Add validator" screen.
3. Select "Script validator" -> "Simple scripted validator"
4. Select one of build-in scripts e.g. "Has one or more attachments".
5. Enter text in "Error Message", "Field" is left empty.
6. Save and publish changes (+refresh web browser CTRL+F5).
7. Create new issue:

  • fill in all mandatory fields,
  • add one attachment

Result:
Upon pressing "Create" system displays error message entered in po. 5.
Generally system displays error message ALWAYS, no matter whether condition is validated to true or false.

Please help.

4 answers

0 vote

You can't get attachments like this, because they are not available to the attachment manager until the transition has completed. IIRC you will need to check the current HttpRequest, which I don't have the code for off the top of my head.

Thank you very much for prompt reply.

 

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 yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

125 views 4 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