Script runner help

Hi All,

I want to do regular expression validator check on one of the custom label field through script runner plugin. I'm following below steps,

  • Adding a validator on a transition.
  • Selecting Simple scripted validator
  • Adding a condition: cfValues['Field Name'] ==~ /\d{4}\-\w{8}/ -> [ie, this custom field should be filled with the format like "any four digit-any 8 characters"]

but this is not working for me. Please suggest what modification need to do?

Thanks,

Sanu P Soman 

 

3 answers

1 accepted

This widget could not be displayed.

For labels custom fields try this:

cfValues['Labels Custom field']*.label.every { it ==~ /\d{4}\-\w{8}/ }

Thanks a lot Jamie :-)

This widget could not be displayed.

Any suggestions?

This widget could not be displayed.

Below code is working for 255 character text custom field but not working for custom label field. Please suggest any additional settings need to do for this? cfValues['Text Custom field'] ==~ /\d{4}\-\w{8}/

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

280 views 1 4
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