Using FogBugz On Demand? We've recently rolled out a new sidebar as part of taking FogBugz forward. Please see this article for details on what's new, what's changed, and where you can find all your favorite things.

If you have a test instance of FogBugz with a separate database, you may want to be certain that it won’t interfere with anything that your production instance is using.

Here is a sanitizer script that makes sure you won’t conflict with their email boxes or send emails, and it will set the correct auth type so you can get into your test instance without a password. This is useful if you want to periodically refresh the data in your test instance with the latest backup from your production instance.

Be careful not to run this script against your active FogBugz database, this deletes data from the database without backing it up!


-- Remove pending outgoing mail

-- Turn off outgoing emails to FogBugz Users
UPDATE Person SET fNotify = 0, fEscalationReport = 0;

-- Disable Mailboxes so you don't pull emails into test
UPDATE Mailbox SET fDeleted = 1; 

-- Unsubscribe all users
DELETE FROM Subscriptions;

-- Don't ever send email
UPDATE Setting SET sValue = 'NONE' WHERE sKey= 'sSMTPServer';

-- Use Passwords instead of e.g., LDAP
UPDATE Setting SET sValue = '1' WHERE sKey= 'fPasswordEnable';
UPDATE Setting SET sValue = '0' WHERE sKey= 'iAuthType';

-- Update the base url so internal links and redirects don't point to production (you'll need to supply an appropriate value)
UPDATE Setting SET sValue = '' WHERE sKey = 'sUrlPrefixEmail';

If you are running FogBugz On Site, there may be more to do depending on how you have your test installation configured. Contact Us and we’ll be happy to make sure you’ve got everything you need!