How do I delete cases? - FogBugz Knowledge Exchange most recent 30 from http://fogbugz.stackexchange.com 2013-05-21T22:07:34Z http://fogbugz.stackexchange.com/feeds/question/16 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases How do I delete cases? Rich Armstrong 2009-09-10T16:25:55Z 2013-02-19T15:31:42Z <p>Often, information makes its way into cases that can make them misleading. It's also possible for sensitive information to be inadvertently introduced, either through email or erroneous case edits.</p> <p>Some FogBugz users also want to be able to delete cases just as a clean-up measure.</p> <p>Is it possible to delete cases or to delete entries within cases (a.k.a. bug events)?</p> <p>See Also:</p> <ul> <li><a href="http://fogbugz.stackexchange.com/questions/10190" rel="nofollow">Deleting old cases</a></li> <li><a href="http://fogbugz.stackexchange.com/questions/1038" rel="nofollow">Deleting old email attachments</a></li> <li><a href="http://fogbugz.stackexchange.com/questions/5901" rel="nofollow">Deleting old attachments</a></li> </ul> <blockquote> <p><img src="http://www.gravatar.com/avatar/baf927dcc0b0c5d0f41dece1e575aa0f?s=32&amp;d=identicon&amp;r=PG" alt="Fog Creek"> <a href="http://fogbugz.stackexchange.com/questions/1023/whats-that-kiwi-logo-and-case-number-at-the-bottom-of-my-feature-request" rel="nofollow">Case FC1209083</a></p> </blockquote> http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases/19#19 Answer by Rich Armstrong for How do I delete cases? Rich Armstrong 2009-09-10T17:03:51Z 2012-05-22T13:54:00Z <p>We have logged this as a feature request. Please vote up the question above to show your support for adding this feature.</p> <hr> <p>FogBugz is built around the idea of capturing and tracking everything about your project. To that end, we've made some design decisions that might seem odd at first, but actually end up making a lot of sense. It's sort of like looking for the "off" button on your iPod. For an iPod, paused is the same as off.</p> <p>A closed case is, for the purposes of issue tracking, the same as deleted. It no longer shows up in filters, it's not assigned to anyone. It can be found only by filtering for closed cases or by searching for text in it specifically. We've found that once people get used to the idea of just closing a case and moving on, it never comes up again, the same way you get used to not having to manually switch off your iPod.</p> <p>Most often, the cases that people are looking to delete are the ones with the title "foo" or "test" that they put in when they were starting off with FogBugz. There are two options here. First, you can close and ignore the case. Other bugs will be filed, and soon those cases will be a distant memory. Or, you can install the <a href="http://www.fogcreek.com/FogBugz/plugins/plugin.aspx?ixPlugin=36" rel="nofollow">Case Event Edit</a> plug-in, which will allow you to repurpose those old cases for new uses.</p> <p>For customers where there might be a security or privacy issue (such as a credit card number erroneously stored in a case), we recommend running FogBugz on your own server where you have full control over the database and can excise data as necessary.</p> <p>If you truly need to remove information, then removing directly from the database is the only way.</p> <p>Here's how to do that:</p> <p><strong>In FogBugz 7 and earlier:</strong></p> <pre><code>DELETE FROM Attachment WHERE ixBugEvent IN (SELECT ixBugEvent FROM BugEvent WHERE ixBug = 1234); </code></pre> <p><strong>In FogBugz 8 and later:</strong></p> <pre><code>DELETE FROM Attachment WHERE ixAttachment IN (SELECT AttachmentReference.ixAttachment FROM AttachmentReference INNER JOIN BugEvent ON AttachmentReference.ixBugEvent = BugEvent.ixBugEvent WHERE ixBug = 1234); DELETE FROM AttachmentReference WHERE ixAttachmentReference IN (SELECT AttachmentReference.ixAttachmentReference FROM AttachmentReference INNER JOIN BugEvent ON AttachmentReference.ixBugEvent = BugEvent.ixBugEvent WHERE ixBug = 1234); </code></pre> <p>If you're using MySQL, the <code>AttachmentReference</code> query needs to be changed to this:</p> <pre><code>DELETE FROM AttachmentReference WHERE ixAttachmentReference IN (SELECT x.ixAttachmentReference FROM (SELECT * FROM AttachmentReference) as x INNER JOIN BugEvent ON x.ixBugEvent = BugEvent.ixBugEvent WHERE ixBug = 1234); </code></pre> <p><strong>For all versions of FogBugz:</strong></p> <pre><code>DELETE FROM BugView WHERE ixBug = 1234; DELETE FROM BugRelation WHERE ixBugTo = 1234; DELETE FROM BugRelation WHERE ixBugFrom = 1234; DELETE FROM Scout WHERE ixBug = 1234; DELETE FROM TagAssociation WHERE ixBug = 1234; DELETE FROM Duplicates WHERE ixBugDupe = 1234; DELETE FROM Duplicates WHERE ixBugDupeOf = 1234; DELETE FROM TitleWord WHERE ixBug = 1234; DELETE FROM CVS WHERE ixBug = 1234; DELETE FROM TimeInterval WHERE ixBug = 1234; DELETE FROM Subscriptions WHERE ixBug = 1234; DELETE FROM BugEvent WHERE ixBug = 1234; DELETE FROM Bug WHERE ixBug = 1234; </code></pre> <p>If you want to delete all cases in a given project or group of projects, it's easy enough to put <code>WHERE ixBug IN (SELECT ixBug FROM Bug WHERE ixProject IN (2,3,4))</code> instead of <code>WHERE ixBug = 1234</code>.</p> <p><strong>See also</strong> <a href="http://fogbugz.stackexchange.com/questions/5901/purge-old-attachments-from-fogbugz-database" rel="nofollow">deleting old attachments</a> and <a href="http://fogbugz.stackexchange.com/questions/1038/shrink-my-fogbugz-database-by-removing-old-email-attachments" rel="nofollow">deleting email-attachments</a>.</p> http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases/147#147 Answer by Nick Pierpoint for How do I delete cases? Nick Pierpoint 2009-10-01T19:30:41Z 2009-10-01T19:30:41Z <p>For "On Demand", will Fog Creek permanently delete cases on request?</p> http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases/1541#1541 Answer by Roman for How do I delete cases? Roman 2010-01-21T08:48:26Z 2010-01-21T08:48:26Z <p>I usually mark cases as spam and they are deleted later. After doing this I reset spam autosort. I don't get spam on my mailbox, and I don't use autosort feature for categorizing incoming emails, that's why I can do it safely.</p> <p>Some cases are not deleted (e.g., if I created a case myself). In this case sometimes there is another workaround: send email from case that I want to be deleted to some spam case (i.e. to my cases@domainname.fogbugz.com address with (Case #) in email title).</p> <p>Another way is to leverage auto-deleting feature for old incoming emails.</p> <p>I deleted over 50 cases and couldn't delete 7. It is time-consuming, but I like having only data that I want to keep, that's why I did it.</p> http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases/3989#3989 Answer by Lianne for How do I delete cases? Lianne 2010-08-12T11:40:16Z 2010-08-12T11:40:16Z <p>I have made another Project named "trashcan". Only administrators are able to move it to this project. Cases are not actually deleted, but are also not visible in the real project anymore.</p> http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases/8364#8364 Answer by Malc for How do I delete cases? Malc 2011-06-02T11:47:09Z 2011-06-02T11:47:09Z <p>This does'nt help with subcases which still show up in filters, you have to go through each one and remove the parent task.</p> <p>Not being able to delete is a BAD design decision and should be reconsidered. It just stupid</p> http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases/8447#8447 Answer by unknown (google) for How do I delete cases? unknown (google) 2011-06-12T02:04:16Z 2011-06-12T02:04:16Z <p>We migrated from another system to FogBugz, and we had to run our in-house migration scripts a couple of times. We did put all the tickets of the previous test runs in a "Test" project, and we would like to either delete them, or at least make sure they don't show up in search.</p> <p>We are takers for any solution to that issue, since it makes the search box a major pain to use as it is right now!</p> http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases/8497#8497 Answer by Marcus Stade for How do I delete cases? Marcus Stade 2011-06-19T05:36:33Z 2011-06-19T05:36:33Z <p>Comparing a delete feature in a product like fogbugz with the off button on an iPod is a bit silly. An iPod doesn't need an off feature since just as you say, when the iPod isn't in use, for all intents and purposes, it's off. A case however, may have several reasons why it's no longer needed and should be removed; you touch on a few of the reasons yourself even. Agreed, in 9 out of 10, closing a case is likely to be enough (and even recommended!) but for that 10th case there must be a way of adding this feature without sacrificing either the UX or the integrity of the case list.</p> <p>Case removal could well be an admin feature and even then it doesn't have to be fully deleted: just move it to some sort of trash area and then do garbage collection after some amount of time. I often think of fogbugz as a source controlled to-do list, and in this sense I not only want but need a good way of mucking about with history to have it make any sort of sense. And when (not if) I screw up, there's always a <a href="http://gitready.com/intermediate/2009/02/09/reflog-your-safety-net.html" rel="nofollow">safety net</a>.</p> <p>In any event, your comparison is actually wrong. The iPod <em>does</em> have an off feature, just press the hold switch until it turns off, for real. This is a rather non-obvious feature, but it's <em>there</em>, just like the suggested case removal feature could be.</p> http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases/8664#8664 Answer by Mattias for How do I delete cases? Mattias 2011-07-02T12:26:59Z 2011-07-02T12:26:59Z <p>Please, please, please let me delete attachments. We use Fogbugz for support, and customers what to be sure we have deleted the secret attachmemnts once the case is closed.</p> http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases/10063#10063 Answer by Carl for How do I delete cases? Carl 2012-03-03T09:10:20Z 2012-03-04T12:19:02Z <p>Is not this MySQL code for deleting AttachmentReference more efficient (at least in MySQL 5.1)?</p> <pre><code>DELETE ar FROM AttachmentReference ar INNER JOIN BugEvent ON ar.ixBugEvent = BugEvent.ixBugEvent INNER JOIN Bug ON Bug.ixBug = BugEvent.ixBug WHERE Bug.ixBug = 1234 </code></pre> <p>Im just qurious since the mentioned code in the answer for MySQL takes about 4 minutes / case to execute... Or am I missing something?</p> <p>Also, the Delete Attachment code is also very slow on MySQL. Takes about 2-3 minutes / case... Is there any possibility to get some help to optimize this?</p> <p>I need to delete a lot of cases and with the current speed of these statements its not going to finish for at least a couple of months ;) </p> http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases/10985#10985 Answer by tdig for How do I delete cases? tdig 2012-12-03T19:11:39Z 2012-12-03T19:11:39Z <p>It's great that you've created a work flow based on sound, tested principles. Overall I think it's a great system. </p> <p>But to tell people that they don't realize that deleting a case may come back to haunt them? I think we're capable of determining whether a case should (or needs to) be deleted, or if it should just be closed.</p> http://fogbugz.stackexchange.com/questions/16/how-do-i-delete-cases/11136#11136 Answer by MaxZ for How do I delete cases? MaxZ 2013-02-19T15:31:42Z 2013-02-19T15:31:42Z <p>It should only be possible by an admin!</p>