Case Sensative Triggers

Hi,

We have made a trigger that detects if any ticket raised has the word virus in it and automatically gives it an urgent priority.

HOWEVER the trigger is case sensitive so at the moment our trigger is this:

Is there a way to make it not case sensitive easily or do we need to add everyway virus could be written out separately e.g. 'Virus', 'VIRUS', 'ViRuS' etc?

You need to use match() function (check its description in documentation). It returns true if the first argument is an occurrence of a regular expression contained in the second one. For this exact case, the condition will look like:

The function with arguments: match([Ticket.Title], '(?i).*(virus)+.*')

[Ticket.Title] - reference to the title of a ticket.
(?i).*(virus)+.* - regular expression (should be enclosed in single quotes).
(?i) - case insensitivity flag.
.* - any character occurred zero or more times.
(virus)+ - sequence of characters occurred one or more times.

And here are sample results of checking the condition (from trigger logs):

22.04.2020, 09:56:42 started on ticket #2

Resolved condition values: {
    "Ticket.Title": "This is a sample ticket (viRus) assigned to you #2",
    "match": "True"
}

Condition result: true

Actions runs: 


22.04.2020, 09:56:22 started on ticket #1

Resolved condition values: {
    "Ticket.Title": "This is a sample ticket assigned to you #1",
    "match": "False"
}

Condition result: false
2 Likes

Thanks! This works perfectly!