I have a scripted validator checking the summary for "we are sorry". I was wondering if there is a way to catch all iterations of this phrase? (i.e. We Are Sorry, WE are SoRRy)
Right now I am using this:
! issue.getSummary().contains("we are sorry")
I could keep adding that line with the differences, but I was hoping for something a bit more efficient. Any help would be extremely appreciated.
PS. I have very little coding experience, but have been able to create scripts looking at examples.
Hi Tim,
You can have something like
! issue.summary.toLowerCase().contains("we are sorry")
Which will actually, just for the comparison, transforms the summary to lower case ... :)
Hope that helps,
Thanos
Hello Thanos,
That worked perfectly! Thank you very much!
Tim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.