Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Compare rule matching part of a word to incorrectly trigger

Mark Cartwright
Contributor
January 4, 2019

Hello,

I have a rule set to check if a summary contains the word 'webex' which then edits some issue fields for triaging tickets and this is fine.

However, if a user logs a ticket which, in the summary, contains the word 'webexpenses', the rule is applied where I would not want it to be.

I've tried to create a separate rule for the webexpenses tickets to be correct but this is being overwritten by my webex rule.

I've also tried using different conditions such as equals or contains regular expression but these won't work as the user can will usually put more than just webex in the summary of their ticket.

Have also looked through this community as best as I can with no luck either so any help would be most appreciated.  I'm new to this tool so hopefully there's someone with the experience to point me in the right direction.

Many thanks in advance,

Mark

2 answers

1 accepted

0 votes
Answer accepted
Mark Cartwright
Contributor
February 20, 2019

Hi John,

Finally got our version updated and found the following comparison worked for us.

2019_02_20_11_44_37_Project_automation_Bottomline_JIRA.png

 

Thanks for your help on this.

Mark

John McKiernan
Atlassian Partner
February 20, 2019

Hey Mark, 

glad to hear! Got there in the end :)

best of luck,

John

1 vote
John McKiernan
Atlassian Partner
January 6, 2019

Hey Mark, 

I hope you are enjoying using Automation for Jira so far. 

So for your use case here, you will want to use a compare condition with the following structure:

{{issue.summary}} Contains Webex[^p] 

This ensures that the letter 'p' can never follow the word 'Webex' thus ruling out Webexpenses. 

Screenshot at Jan 07 16-04-14.png

I hope that helps but let me know if you have any other questions.

Cheers,

John 

Mark Cartwright
Contributor
January 7, 2019

Hi John,

The tool is great and I can see how it will save us a great deal of time.

 

Unfortunately this is not working for me.  I'm not sure why but I think it's now looking for the [^p] as plain text.

Capture.PNGAm I missing a setting of some sort for the system to recognise this tag?

Thanks,
Mark

John McKiernan
Atlassian Partner
January 7, 2019

Hey Mark,

Apologies I think I slightly mislead you here. Regex can be a pain! 

Make these two changes and it should work for you:

1) Change from 'contains' to 'matches' in your compare condition.

2) Use a lower case 'w' in webex[^p] 

Let me know if that doesn't work for you 

Cheers,

John 

Mark Cartwright
Contributor
January 8, 2019

Hi John,

Thanks for coming back to me.

Unfortunately that's not worked for me either.  I've tried changing 'contains' to 'Equals' and 'Exactly matches regular expression' as I don't have the option of just 'match'.

Have also dropped the w to lower case in webex[^p]

Many thanks,
Mark

John McKiernan
Atlassian Partner
January 8, 2019

Hey Mark,

What version of Automation for Jira are you using? We added the 'matches regex' function fairly recently. If you upgrade to the latest version, you should be able to see this. Let me know if not.

Cheers,

John 

Mark Cartwright
Contributor
January 11, 2019

Hi John,


Sorry for the delay.  We're running version 4.1.0 so I'll check for updates.

Will post how we get on.


Thanks,
Mark

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events