#13045 closed enhancement (fixed)
Enter Quiet Mode does not work
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | QuietPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.2 |
Description
When I press "Enter Quiet Mode", the rendered wep page only contains this text:
{"is_quiet": true, "label": "Leave Quiet Mode"}
The link for the page says:
http://path/to/trac/quietmode/toggle
I think the toggle is happening: if I go to a ticket, it offers "Leave Quiet Mode". The same thing happens when toggling the other way. So it just looks like an intermediate page is shown.
The browser is Firefox 45.0.1 and 50.0.1 on Linux.
In Internet Explorer on Windows, I get a message asking if I want to open or save toggle.json. Which is I guess the text that Firefox is showing to me.
Attachments (3)
Change History (41)
comment:1 Changed 8 years ago by
Type: | defect → enhancement |
---|
comment:2 Changed 8 years ago by
I think it should prevent to use on Trac 1.2 without AnnouncerPlugin.
comment:3 follow-up: 4 Changed 8 years ago by
Ok. I don't even see the "Quiet Mode" button on Trac 1.2. It is highly desirable to have that feature in 1.2 for Batch modifications. Is that a feature request to Trac or is this Plugin also focusing the new Notification system since Trac 1.2?
comment:4 Changed 8 years ago by
It is highly desirable to have that feature in 1.2 for Batch modifications.
Without Announcer batch modifications only send a single batch notification.
comment:5 Changed 8 years ago by
We'll need to make this compatible with Trac 1.2, but as noted, I don't see the specific need for this feature for BatchModify since only one notification message is sent by Trac's notification system.
comment:6 Changed 8 years ago by
It is also very useful in a ticket triage. We have these occasionally.
comment:7 Changed 8 years ago by
Owner: | set to Ryan J Ollos |
---|---|
Status: | new → accepted |
comment:9 follow-up: 38 Changed 8 years ago by
Updated QuietPlugin@18, but I haven't actually published to PyPI yet. I'll wait for the end of the week to see if I get any feedback on the changes.
For now you should be able to install with:
$ pip install svn+https://trac-hacks.org/svn/quietplugin/1.2/
It often works better to uninstall old versions of TracQuiet first. I can often run the command repeatedly when there are multiple eggs installed for an older version of the plugin:
$ pip uninstall TracQuiet # repeat command until "not installed" is seen
$ pip install -U pip setuptools wheel
I wonder if there is a better way to implement this than overriding EmailDistributor
. I don't know the notification API well enough yet, but I wonder if a notification subscriber could be used instead.
comment:10 Changed 8 years ago by
I have installed the plugin and now I get a different background that says Shhh... So that works.
But when I changed a ticket while in quite mode, I still received an e-mail. I enabled all 4 options in the Admin tab for this plugin.
comment:11 Changed 8 years ago by
You need to disabled trac.notification.mail.EmailDistributor
. See QuietPlugin#Installation.
comment:12 Changed 8 years ago by
I have disabled this, but I still get e-mails. For both comments and adding attachments.
I am only using the Trac notification system, as the Announcer plugin seems not to work with Trac 1.2.
comment:15 Changed 8 years ago by
Please update plugin to r16302 and enable debug level logging. Example:
10:05:39 Trac[mail] DEBUG: Email address w/o domain: somebody 10:05:39 Trac[mail] DEBUG: Email address w/o domain: user4 10:05:39 Trac[mail] DEBUG: Email address w/o domain: value propagation 10:05:39 Trac[api] DEBUG: Adding (user1 [1]) for 'always' on rule (CarbonCopySubscriber) for (email) 10:05:39 Trac[api] DEBUG: Adding (user2 [1]) for 'always' on rule (TicketPreviousUpdatersSubscriber) for (email) 10:05:39 Trac[web_ui] DEBUG: QuietEmailDistributor skipping distribution of TicketChangeEvent because quiet mode is enabled for user1
comment:16 Changed 8 years ago by
I have attached the relevant part of the log. I did receive the e-mail while in quiet mode.
comment:17 follow-up: 18 Changed 8 years ago by
trac.notification.mail.EmailDistributor
is still enabled. It should be disabled.
2017-03-10 07:31:13,515 Trac[mail] DEBUG: EmailDistributor has found the following formats capable of handling 'email' of 'ticket': text/html, text/plain
If QuietEmailDistributor
is used, ... Trac[web_ui] DEBUG: EmailDistributor ...
would be logged.
comment:18 follow-up: 19 Changed 8 years ago by
Replying to Jun Omae:
trac.notification.mail.EmailDistributor
is still enabled. It should be disabled.
[...]
IfQuietEmailDistributor
is used,... Trac[web_ui] DEBUG: EmailDistributor ...
would be logged.
Ah, I misunderstood. Please ignore it.
comment:19 Changed 8 years ago by
Replying to Jun Omae:
Replying to Jun Omae:
trac.notification.mail.EmailDistributor
is still enabled. It should be disabled.
[...]
IfQuietEmailDistributor
is used,... Trac[web_ui] DEBUG: EmailDistributor ...
would be logged.Ah, I misunderstood. Please ignore it.
Maybe I should add some logging so we can be sure that QuietEmailDistributor
is being called, even when quiet mode is not enabled?
comment:20 follow-up: 21 Changed 8 years ago by
Some logging sounds good.
Also, for Trac core, it would be good to use self.__class__.__name__
rather than EmailDistributor
in the literal to log.
-
trac/notification/mail.py
diff --git a/trac/notification/mail.py b/trac/notification/mail.py index 99cceecd3..220334c0a 100644
a b class EmailDistributor(Component): 300 300 self.log.error("EmailDistributor No formats found for %s %s", 301 301 transport, event.realm) 302 302 return 303 self.log.debug(" EmailDistributor has found the following formats"304 " capable of handling '%s' of '%s': %s", transport,305 event.realm, ', '.join(formats.keys()))303 self.log.debug("%s has found the following formats capable of " 304 "handling '%s' of '%s': %s", self.__class__.__name__, 305 transport, event.realm, ', '.join(formats.keys())) 306 306 307 307 notify_sys = NotificationSystem(self.env) 308 308 always_cc = set(notify_sys.smtp_always_cc_list)
comment:21 Changed 8 years ago by
Replying to Jun Omae:
Also, for Trac core, it would be good to use
self.__class__.__name__
rather thanEmailDistributor
in the literal to log.
Thanks, created trac:#12718.
comment:23 Changed 8 years ago by
Please try r16322. If you see the following logged:
11:42:17 Trac[web_ui] DEBUG: QuietEmailDistributor dispatching to EmailDistributor
then we should look at the quietmode
values saved in your session_attributes
table.
comment:24 follow-up: 25 Changed 8 years ago by
Any updates on the reported issue? Is it working for you now?
Changed 8 years ago by
Attachment: | debug2.log added |
---|
comment:25 Changed 8 years ago by
Replying to Ryan J Ollos:
Any updates on the reported issue? Is it working for you now?
No change. I still get e-mails. I have enabled logging and attached the log.
comment:26 Changed 8 years ago by
The log message in comment:23 does not appear, so you must have an installation issue. The latest version of the plugin doesn't appear to be installed and/or loaded.
comment:27 Changed 8 years ago by
I checked it out with:
# svn co https://trac-hacks.org/svn/quietplugin/1.2/ A 1.2/quiet A 1.2/quiet/templates A 1.2/quiet/htdocs A 1.2/quiet/web_ui.py A 1.2/quiet/htdocs/quiet.css A 1.2/quiet/htdocs/quiet.js A 1.2/quiet/htdocs/quiet.png A 1.2/quiet/__init__.py A 1.2/setup.py A 1.2/COPYING A 1.2/setup.cfg U 1.2 Checked out revision 16331.
I am pretty sure this is what is installed.
comment:28 follow-up: 29 Changed 8 years ago by
Could you share your [components]
section of trac.ini?
comment:29 Changed 8 years ago by
comment:30 follow-up: 31 Changed 8 years ago by
EmailDistributor
is enabled and QuietEmailDistributor
is disabled. Changes:
-quiet.web_ui.quietemaildistributor = disabled +quiet.web_ui.quietemaildistributor = enabled +trac.notification.mail.EmailDistributor = disabled
or
-quiet.web_ui.quietajaxmodule = enabled -quiet.web_ui.quietemaildistributor = disabled -quiet.web_ui.quietlistenerajaxmodule = enabled -quiet.web_ui.quietmodule = enabled +quiet.* = enabled +trac.notification.mail.EmailDistributor = disabled
See step (3) in QuietPlugin#Installation.
comment:31 follow-up: 32 Changed 8 years ago by
Replying to Ryan J Ollos:
EmailDistributor
is enabled andQuietEmailDistributor
is disabled. Changes:-quiet.web_ui.quietemaildistributor = disabled +quiet.web_ui.quietemaildistributor = enabled +trac.notification.mail.EmailDistributor = disabledor
-quiet.web_ui.quietajaxmodule = enabled -quiet.web_ui.quietemaildistributor = disabled -quiet.web_ui.quietlistenerajaxmodule = enabled -quiet.web_ui.quietmodule = enabled +quiet.* = enabled +trac.notification.mail.EmailDistributor = disabledSee step (3) in QuietPlugin#Installation.
I thought I had this correct...
After this change, I think it is working.
Will this plugin be compatible with the Announcer plugin? I dream of being able to use that in Trac 1.2...
comment:32 follow-up: 33 Changed 8 years ago by
Replying to roger.oberholtzer@…:
Will this plugin be compatible with the Announcer plugin?
Yes, should be.
I dream of being able to use that in Trac 1.2...
What features do you want that haven't been included in Trac 1.2?
comment:33 follow-up: 34 Changed 8 years ago by
Replying to Ryan J Ollos:
What features do you want that haven't been included in Trac 1.2?
I was thinking of all the other plugins that don't sent notifications in a way that is compatible with the Announcer plugin on 1.2. Would this plugin work with the Announcer plugin on a Trac 1.2 system?
comment:34 Changed 8 years ago by
Replying to roger.oberholtzer@…:
I was thinking of all the other plugins that don't sent notifications in a way that is compatible with the Announcer plugin on 1.2.
Which plugins? Presumably they need to be adapted to the new Trac notification system and making Announcer work with Trac 1.2 isn't going to solve that. AnnouncerPlugin for Trac 1.2 will just include the features that haven't yet been ported to Trac 1.2.
Would this plugin work with the Announcer plugin on a Trac 1.2 system?
Yes, but once Announcer plugin is ported to Trac 1.2.
comment:38 Changed 8 years ago by
Replying to Ryan J Ollos:
I wonder if there is a better way to implement this than overriding
EmailDistributor
. I don't know the notification API well enough yet, but I wonder if a notification subscriber could be used instead.
Better implementation proposed in #13117.
This plugin integrates with AnnouncerPlugin, not new Notification system since Trac 1.2.