Making the NotifyActor config option a user preference

I tried adding the following code to my RT_SiteConfig.pm to see if I can
make the NotifyActor config option a user preference:

package RT::Config;
{ $META{‘NotifyActor’} = {
Section => ‘Mail’, #loc
Overridable => 1,
Widget => ‘/Widgets/Form/Boolean’,
WidgetArguments => {
Description => ‘Receive own posts’, # loc
Hints => “Toggles whether you want to receive copies of your own messages” #loc
}
};
}

This did successfully add the option to the “Mail” preference box, but
it does not seem to have an effect when RT sends email. Is there
something wrong with this?

Also, while trying to figure out what was wrong, I think I found a small
bug, but fixing it did not seem to help. See attached patch.

~Jason

/------------------------------------------------------------------
| Jason A. Smith Email: smithj4@bnl.gov |
| Atlas Computing Facility, Bldg. 510M Phone: +1-631-344-4226 |
| Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 |
| Upton, NY 11973-5000, U.S.A. |
------------------------------------------------------------------/

rt-action-notify-group-config.patch (578 Bytes)

smime.p7s (3.81 KB)

I tried adding the following code to my RT_SiteConfig.pm to see if I can
make the NotifyActor config option a user preference:

Coincidentally, you may be interested in
59b5f56d348983efb5c6ec40fc1e2148d7fd004d

The issue you are running into is that you need to pass the current
user context to RT->Config->Get, otherwise it just uses the system
setting.

-kevin

I tried adding the following code to my RT_SiteConfig.pm to see if I can
make the NotifyActor config option a user preference:

Coincidentally, you may be interested in
59b5f56d348983efb5c6ec40fc1e2148d7fd004d

The issue you are running into is that you need to pass the current
user context to RT->Config->Get, otherwise it just uses the system
setting.

Hi Kevin,

Thanks! I tried your patch on our 3.8.6 server and it works perfectly.

~Jason

/------------------------------------------------------------------
| Jason A. Smith Email: smithj4@bnl.gov |
| Atlas Computing Facility, Bldg. 510M Phone: +1-631-344-4226 |
| Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 |
| Upton, NY 11973-5000, U.S.A. |
------------------------------------------------------------------/

smime.p7s (3.81 KB)