Hi Atlassian Community,
I have the following condition for a script post function (send a custom email) configured:
(issue.getSummary().find('STRING1') || issue.componentObjects*.name.contains('STRING1')) && !(issue.reporter?.displayName.equals('Standby'))
I would also like to add a description field check when STRING2 is also included in the issue description (AND). I tried adding "&& (issue.getDescription().find('STRING2')" but this did not work and threw an groovy error during the custom mail preview.
Thank you for your assistance.
Regards
Hi @Ken ,
It seems that you just forgot closing brace. This should work:
(issue.getSummary().find('STRING1') || issue.componentObjects*.name.contains('STRING1')) && !(issue.reporter?.displayName.equals('Standby')) && (issue.getDescription().find('STRING2'))
thank you very much. I will try this out. Another question:
If i wanted to add an additional STRING3 to be compared if either STRING2 OR STRING3 exists, could i do it like this:
(issue.getSummary().find('STRING1') || issue.componentObjects*.name.contains('STRING1')) && !(issue.reporter?.displayName.equals('Standby')) && (issue.getDescription().find('STRING2')) || (issue.getDescription().find('STRING3'))
Or could I do it all in one check like this: issue.getDescription().find('STRING2','STRING3'))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not a groovy expert but I think you need
(issue.getSummary().find('STRING1') || issue.componentObjects*.name.contains('STRING1')) && !(issue.reporter?.displayName.equals('Standby')) && (issue.getDescription().find('STRING2') || (issue.getDescription().find('STRING3')))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Discover the teamwork and precision behind success on and off the track. See how this high-performing team makes the impossible possible. Be one of the first 100 customers to register for a chance to win 2 tickets to an Atlassian Williams 2026 race.
Register now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.