show/hide this revision's text 2 edit

Our Fogbugz installation had some email addresses that were important for receiving email/cases, but we didn't necessarily want to let people know that they were named, much less let them send email from them.

There were addresses that we considered "inbound only", so showing them as an option in the "From" drop down just cluttered things. Also, there was one email address that we didn't want people to be able to send from the "generic" version - instead, we wanted them to use their "personal" version of the shared address. Removing the shared version of this address (websupport) was needed. Therefore, we needed a way to remove email address options from the dropdown alltogether, which is how we arrived at the following customization:

name:          RemoveOptions_sFrom
description:   Removes specified email addresses from from options when sending/replying/forwarding email in Fogbugz
author:        Michael Kandy
version:       2.3.2

js:

$(function(){
    if (!$('#bugviewContainer').length) return;
    var chgMail = function(sCommand) {
        $('select#sFrom > option:contains("uiccgitckrptng@somecompany.com")').remove(); 
        $('select#sFrom > option:contains("agencydownloads@somecompany.com")').remove();
        $('select#sFrom > option:contains("\"Websupport\" <websupport@somecompany.com>")').remove();
        $('select#sFrom > option:contains("systems_entry@somecompany.com")').remove();
        $('select#sFrom > option:contains("systems_fogbugz@somecompany.com")').remove();
        DropListControl.refresh($("#sFrom")[0]);
    };
    chgMail('load');
    chgMail('reply');
    chgMail('forward');
    $(window).on('BugViewChange', function(e, data) {
        chgMail(data.sCommand); 
    });
});
show/hide this revision's text 1 [made Community Wiki]

Our Fogbugz installation had some email addresses that were important for receiving email/cases, but we didn't necessarily want to let people know that they were, much less let them send from them.

There were addresses that we considered "inbound only", so showing them as an option in the "From" drop down just cluttered things. Also, there was one email address that we didn't want people to be able to send from the "generic" version - instead, we wanted them to use their "personal" version of the shared address. Removing the shared version of this address (websupport) was needed. Therefore, we needed a way to remove email address options from the dropdown alltogether, which is how we arrived at the following customization:

name:          RemoveOptions_sFrom
description:   Removes specified email addresses from from options when sending/replying/forwarding email in Fogbugz
author:        Michael Kandy
version:       2.3.2

js:

$(function(){
    if (!$('#bugviewContainer').length) return;
    var chgMail = function(sCommand) {
        $('select#sFrom > option:contains("uiccgitckrptng@somecompany.com")').remove(); 
        $('select#sFrom > option:contains("agencydownloads@somecompany.com")').remove();
        $('select#sFrom > option:contains("\"Websupport\" <websupport@somecompany.com>")').remove();
        $('select#sFrom > option:contains("systems_entry@somecompany.com")').remove();
        $('select#sFrom > option:contains("systems_fogbugz@somecompany.com")').remove();
        DropListControl.refresh($("#sFrom")[0]);
    };
    chgMail('load');
    chgMail('reply');
    chgMail('forward');
    $(window).on('BugViewChange', function(e, data) {
        chgMail(data.sCommand); 
    });
});