4

1

Is there a way to remove an email address from the suggested list of previously sent to email contacts in FogBugz 7?

This is the AJAX suggestion list that appears when typing in an email address.

flag

1 Answer

3

You can't currently remove them through the FogBugz web interface, but you can remove them via the XML API's deleteEmailAddress command.

The full XML API URL would look something like

http://[your fogbugz]/api.asp?cmd=deleteEmailAddress&sEmail=[email address you want to remove]&token=[your XML API token]

Note that the account you use to obtain your XML API token will need to be a site administrator account in order to use the deleteEmailAddress command.

More information on the FogBugz XML API can be found here.

link|flag
As of FogBugz 8.3, the XML API now returns <response><error code=27">No such API command</error></response> if you provide an invalid cmd. I've updated the deleteEmailAddress command to now return <response><emails rows_affected="X"/></response> (this will go out with 8.4). That being said, you can always confirm whether or not an email address has been deleted by using findEmailAddress after using deleteEmailAddress. Another thing to check is that you are properly URL-encoding the email address you're trying to find/delete. – db Feb 16 2011 at 14:58
Thanks for the update. I figured out what the problem was (cough user error cough). The FogBugz site that from which I was trying to delete the email address is a secondary FB installation where I am a project admin, but not a site admin. It suddenly occurred to me that one would probably need full administrative rights in order to delete an email address; once I was granted them, the delete succeeded. (So, as well as the rows_affected, it might be nice to have a status code for insufficient privileges.) Thanks for your help. – Bradley Grainger Feb 17 2011 at 2:26
Ahh...that explains it. I noticed that in the code, but forgot to ask that question. I've updated my answer to mention that, and also changed the code to return our "Insufficient Permissions" error to avoid this problem in the future. Thanks for your help with this! – db Feb 17 2011 at 14:26

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.