#3778 closed defect (wontfix)
Plugin does not respect NeverNotifyUpdaterPlugin
Reported by: | Owned by: | CStrac | |
---|---|---|---|
Priority: | normal | Component: | FlexibleReporterNotificationPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
First thank you for this little plugin. I was looking for the same issue and was thinking about an enhancement of the AdvancedTicketWorkflowPlugin. This is the better way I think.
We are using email2trac and want to notify the reporter as you mentioned in your description.
There is a lttle problem with NeverNotifyUpdaterPlugin which is no longer operating after installation of this plugin!
Reason seems to be that NeverNotifyUpdaterPlugin uses the same procedure:
4 def get_recipients(self, tktid): ... 48 if not notify_updater: 49 filter_out = True 50 # if notify_reporter and (updater == self.reporter): 51 # filter_out = False 52 # if notify_owner and (updater == self.owner): 53 # filter_out = False 54 if filter_out: 55 torecipients = [r for r in torecipients if r and r != updater] 56 ccrecipients = [r for r in ccrecipients if r and r != updater] 57 elif updater: 58 torecipients.append(updater)
Looks like that the behaviour depends on order of loading the eggs.
Is there a way to fix this? Perhaps in respecting each other?
Attachments (0)
Change History (2)
comment:1 Changed 16 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 16 years ago by
Sorry for the little delay...
This is exactly what I did. I included the NeverNotifyUpdaterPlugin-Code into this plugin creating a new version 0.0.2
The feature is activated by the new option NeverNotifyUpdater=true in [Notification] section of trac.ini
-
api.py
==================================================================
10 10 notify_updater = self.config.getbool('notification', 11 11 'always_notify_updater') 12 12 for_reporting = self.config.getlist('notification','reporter_states') 13 for_updating = self.config.getbool('notification','NeverNotifyUpdater') 13 14 ccrecipients = self.prev_cc 14 15 torecipients = [] 15 16 cursor = self.db.cursor() … … 53 54 for updater, in cursor: 54 55 break 55 56 57 # Check for NeverNotifyUpdater==true (included from NeverNotifyUpdaterPlugin) 58 if (not notify_updater) and (for_updating): 59 filter_out = True 60 if filter_out: 61 torecipients = [r for r in torecipients if r and r != updater] 62 ccrecipients = [r for r in ccrecipients if r and r != updater] 63 elif updater: 64 torecipients.append(updater) 56 65 57 66 58 67 return (torecipients, ccrecipients)
Both the plugins override the same method "get_recipients". Therefore I dont think they can mutually co-exist. Any two plugins overriding a method may not mutually co-exist.
But the functionality of both the plugins can be included in a single plugin.