Groovy check rtps for comma and throw error
Summary:
I am looking to add logic to an existing Groovy rule we have that adds dynamic children to our projects hierarchy. I need to add logic that checks the rtps.rtp_Project_Name for commas and throws an error if there is a comma in the string. I tried adding the following but it is throwing a validation error.
// Check for commas in the new project name
if (rtps.rtp_Project_Name.contains(",")) {
throwVetoException("Project name cannot contain commas.")
}
Content (please ensure you mask any confidential information):
Version (include the version you are using, if applicable):
Code Snippet (add any code snippets that support your topic, if applicable):
Tagged:
0