3

1

I've been ignoring the errors in my FogBugz installation and they're piling up. Is there something I can do do mass dismiss the errors?

flag

2 Answers

3

Update: A bulk-hiding button has been added to the bottom of the admin notifications page. It will be available in FogBugz 8.6.

Here's another BugMonkey script that builds on Rich's idea. This one can be stored permanently since it requires that you click the "hide all" link for the action to occur.

name:          Hide all admin notifications
description:   Adds a link to the notifications page to let you dismiss all in one go
author:        Rob Sobers, Adam Wishneusky
version:       1.1.0.0

js:

if (window.location.href.indexOf("pg=pgNotifications") >= 0 && $("p:contains('There are no notifications.')").size() == 0) {
  $('.editInstructions').after('<p>Click to <a id="hideall" href="veryblank.html">hide all notifications</a>.</p>')
}
$('#hideall').click( function() {
  var links = $("a");
  var linksremaining = links.length;
  links.each( function () {
    if ($(this).text() == "Hide Notification"){
      $.get($(this).attr("href"),function(){
        linksremaining--;
      });
    }
  });
  if (linksremaining < 1) {
    window.location.reload();
  }
  return false;
});
link|flag
Nice! (15chars) – Rich Armstrong Mar 22 2010 at 16:56
Hmm, doesn't seem to work unfortunately - we've managed to build up hundreds of notifications, the link appears with the script but when clicked all that happens is the page refreshes... – Steve Baxter Sep 6 2010 at 12:54
@Steve Baxter What version of FogBugz are you using? This was tested on an older version and might have broken since. I'll look into this. In the meantime, you can try Rich's script below or, if you're using licensed FogBugz, clear the Notification table in your database. – Rob Sobers Sep 7 2010 at 14:11
I seem to have a different version in my fogbugz installation. I updated the post. @steve can you try it with the new one, above? – adambox Jun 6 2011 at 15:00
1

Sure. Install the BugMonkey plug-in and put this text into your Javascript temporarily. Once the errors are cleared, delete it from the Javascript:

$("a").each( function () {
  if ($(this).text() == "Hide Notification"){
   window.location = $(this).attr("href");
  }
});

When you load the notifications page into any browser, it'll just grab the first "Hide Notification" link and load it into the browser. That'll keep happening until we run out of links.

link|flag
Perhaps it would be better to create a bookmarklet with this functionality? – Daniel LeCheminant Mar 3 2011 at 13:04
1 
It should be better to add a link to do this directly into Fogbugz.. – Andrea - Eurosystem2000 Apr 29 2011 at 14:07

Your Answer

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