Comment 9 for bug 2022349

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

It should be possible to search and replace in the database to get rid of the copy template alert messages that are in the wrong format.

So if you need to just look through your current templates to find alert messages that are causing problems, here are my notes and sql examples for doing that from the DB.

https://gitlab.com/-/snippets/2588515

I broke the json a few times when testing this out, so my examples show how to make a backup copy.

A perl script that would grab the templates and edit them would be better. Using regexs on json probably isn't a very good practice. I have a bunch of one off perl scripts to edit template json in files. We have 200 or so templates, so whenever we need to make some changes. If I get time I may create a perl script for adding/deleting entries from the templates.