7

1

I love the gmail labs feature which warns me when I mention an attachment in an email but forget to attach one. It has saved me embarrassment many times! I would love if FogBugz would do this.

Until this wonderful idea is put in place, is there a way to hack it with BugMonkey or a plugin?

Fog Creek Case FC1378277

flag
We use FogBugz to handle ALL our incoming and outgoing customer support email, and not sending a promised attachment has bitten me a few times lately. I agree with adambox that the Gmail labs missing attachment detector feature has fixed this issue elegantly, and it would be cool for FogBugz to have a similar feature. – SteveS Feb 11 2011 at 17:55
PS - it's not the least big obvious HOW (or if) there's a way to add a Vote to this feature request or "status-proposed". – SteveS Feb 11 2011 at 17:56
@SteveS to vote for this feature, click the up-arrow above the vote count just under the post's title (it's "6" right now) – adambox Feb 14 2011 at 21:52

2 Answers

1

We have a case open to consider this feature for a future release. Please up-vote this question (not this answer) to show your support for adding this feature.

Until this is implemented as a proper feature or plugin, you can use the following BugMonkey customization:

Warning that is displayed if there are missing attachments

name:        Warn about emails with missing attachments
description: Warns if your email says "attach" but you haven't attached anything
author:      Daniel LeCheminant
version:     1.0.0.0

js: 
   var sWarning = 
      "Your message mentions attachments, " +
      "but you haven't attached anything!\n\n" +
      "Do you still want to send the message?";

   if(!window.clickBugSubmit) return;
   window.clickBugSubmit = (function(fnOrig) {
      return function(e, elForm, fXMLSubmit, sValue, bOK) {
         if(bOK) {
            var fHasAttach = $("#files_list div").length;
            var sEmailText = $("#bugviewContainerEdit .emailHeader").siblings()
                             .find("textarea").val();
            var fSaysAttach = /\battach/i.test(sEmailText);
            if(fSaysAttach && !fHasAttach && !confirm(sWarning)) {
               return cancel(e);
            } 
         }
         return fnOrig.apply(this, arguments);
      };
   })(window.clickBugSubmit);

If you have BugMonkey 2.0 and an administrator has enabled importing from fogbugz.stackexchange.com, you should be able to send the above customization directly to your fobugz. There will be a button to do so at the top left of the code box above.

link|flag
1

The plugin solution might be tricky.

Submitting a case triggers the IPluginBugcommit method, which handles the commit. The IPluginBugCommit method, however, cannot trigger a rollback: when a case is submitted, a plugin cannot stop the creation of the case. Therefore, with the current API it is not possible to trigger a rollback (and show a message to the user) when the attachment is missing.

With the current API, a BugMonkey solution, triggering when the submit button is pressed, would probably be the easiest solution to build. I would, however, prefer a plugin for this feature.

link|flag
A plugin that is little more than a chunk of Javascript (basically a heavy-weight BugMonkey plugin) would probably be a good idea. BugMonkey scripts lack the exposure and apparent polish that plugins have and I would fear that just a script would not be utilized by as many as if it were a plugin. – cdeszaq Jan 12 2011 at 13:59
@cdeszaq: Of course, plugins can implement the same interfaces that BugMonkey does (IPluginStaticJS/IPluginJS), so a working BugMonkey solution could be ported to a proper plugin pretty easily. – Daniel LeCheminant Jan 12 2011 at 14:54
1 
@Daniel: A walkthrough of that process might not be a bad idea, and would also serve as a concrete starting point for any would-be plugin developers. Just a thought. – cdeszaq Jan 12 2011 at 15:25
Here is an example plugin which simply slaps some JS onto FogBugz pages. This is what BugMonkey 1.0 did (minus a few conditionals you could set in its config for what pages to send the JS for): developers.fogbugz.com/default.asp?W21 – adambox Jan 13 2011 at 16:19

Your Answer

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