Need a Jira Workflow Condition to check for text in the Summary using ScriptRunner

I am trying to create a Jira Workflow Condition to check for specific text in the Summary field

This is what I tried:

issue.summary.match(“myword”) == “myword”

but I get this error:

Evaluation failed: “issue.summary.match(“SAST”) == “SAST”” - operator “==” is not applicable to types: List and String

How can I check for this text?

PS: I’m not a JS developer

Hi Cash,
You can try the following:
/SAST/.test(issue.summary)

You can use contains(), which checks whether the string (text) contains the word you need.

issue.summary.contains("myword")

For an exact match, you can use the operator == like this:

issue.summary == "myword"

Note, this will match the contents exactly, ie. it will be true if the summary is “myword”.