Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trello Butler - Negative rules in trigger

Hi community,

 

I am trying to replace spelling mistakes on our boards with correct words to avoid errors later.

I am however having issues with negative rules in my trigger. Butler seems not to take these into account.

In short my issue is that I want to replace "BC" in description in cases where the description does not contain "ABC" or "BBC". However my trigger still fires regardless if my description contains ABC or BBC replacing the content.

Currently my rule looks like this:

when the description of a card with a description not containing "ABC" with a description not containing "BBC" contains "BC", set the card's description to "{textbeforematch}CB{textaftermatch}"

 

Could you help me out here?

1 answer

1 accepted

1 vote
Answer accepted
Iain Dooley Community Leader Feb 09, 2021

@Korppu the best way to do this is using a regex with a negative look behind:

when the description of a card contains "regex:/(?<![AB])BC/", set the card's description to "{textbeforematch}CB{textaftermatch}"

I tested this out, when I set the description to ABC or BBC it doesn't change, but when I set the description to KBC it changes it to KCB 

Worked wonders. Thanks @Iain Dooley

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Trello

Taco Tuesday: Your favorite Trello blog takeaway

Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...

402 views 14 12
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you