Used Zammad installation source: (source, package, …) deb
Operating system: ubuntu 18.04.4
Browser + version: chrome latest
I’ve got a tricky task from our operations-team:
They want the system to set a Tag, if an email contains a special word in subject or body. I’ve did that by using regex and that works as expected.
Now, they also want to set the tags on already existing tickets.
Does someone has a “one-liner” to crawl through all tickets, search for a regex-pattern and if found, set the tag?
This is assuming that you’re using PostgreSQL; no idea how to match via regex in MySQL.
Replace myregex with your regex in PostgreSQL regex syntax, and mytag with the tag you want to add (1 is the ID of the user who assigns the tag, the system user seemed to be a good choice here. You can use your own user ID instead, if you want). Zammad will automatically create the tag if it doesn’t exist yet.