Re: [Trac] Notifications on custom fields
On 05.01.2017 11:17, Mo wrote: Any major migration issues with 1.0 to 1.2? I'll test on a snapshot anyway. Not really, but it maybe depends on what you consider major. Make sure to check: https://trac.edgewall.org/wiki/TracUpgrade https://trac.edgewall.org/wiki/TracUpgrade#to1.2 https://trac.edgewall.org/wiki/TracUpgrade#KnownIssues And especially check all your Plugins! A lot of old plugins from the Trac 0.x days had / have yet to be updated: https://trac-hacks.org/query?release=1.2=status=id=summary=owner=type=status=priority=component=priority That could look something like this (untested): ... Is that code already something that would work as a single-file plugin.py in ./plugins already? Yes, except I made a small mistake: Replace `user_set` by `field_set`. Then it should work. Beside from that, a rule framework configurable on the user preferences would be preferable. Could you explain a bit more what kind of flexibility you're looking for? The single-file plugin subscriber actually adds a rule that can be configured in the user preferences (and / or by the site admin as overridable default). The basics rules available by default look something like this: https://trac.edgewall.org/attachment/wiki/TracDev/Proposals/AdvancedNotification/notification-subscription-prefs.png But you can add more subscribers like above to get more rules in the Trac 1.2 framework. Adding some that are similar to those in Announcer you would get this: https://trac.edgewall.org/attachment/ticket/11870/watch-prefs.png https://www.trac-hacks.org/wiki/MailPlugin I'm not familiar with that plugin, but it's likely it won't work unchanged with Trac 1.2. Best regards, Peter -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To post to this group, send email to trac-users@googlegroups.com. Visit this group at https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
Re: [Trac] 'GitRepository' object has no attribute 'db_rev
On Thursday, January 5, 2017 at 8:24:39 AM UTC-5, Mo wrote: > > Hi, > > https://trac.edgewall.org/wiki/TracGit#Troubleshooting > even says to disable caching. I have a bare repo as it takes less space. > Didn't care about the caching so far, I just updated all my plugins like > CodeReviewerPlugin, must be some bug introduced since my last version. I > filed the bug here: https://trac-hacks.org/ticket/13029#ticket > > Best regards, > Mo > You'll need to enable repository caching to use the plugin. Prior to r16165 you wouldn't see the error, however the plugin wasn't working correctly. The plugin needs the tables created by a cached repository to exist. Peter, do you know if this recommendation is still valid?: - If you don't see the shortrev and commit branch, you probably have caching enabled (cached_repository = true, persistent_cache = true). Set those to false. - Ryan -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To post to this group, send email to trac-users@googlegroups.com. Visit this group at https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
Re: [Trac] 'GitRepository' object has no attribute 'db_rev
Hi, https://trac.edgewall.org/wiki/TracGit#Troubleshooting even says to disable caching. I have a bare repo as it takes less space. Didn't care about the caching so far, I just updated all my plugins like CodeReviewerPlugin, must be some bug introduced since my last version. I filed the bug here: https://trac-hacks.org/ticket/13029#ticket Best regards, Mo Am Mittwoch, 4. Januar 2017 19:09:17 UTC+1 schrieb Peter Suter: > > Hi,Looks like the error occurred here: > https://trac-hacks.org/browser/codereviewerplugin/1.0/coderev/web_ui.py#L81 > in the CodeReviewerPlugin. https://trac-hacks.org/wiki/CodeReviewerPlugin > You might want to open a ticket there. > > That plugin might be incompatible with uncached Git repositories. It > assumes > GitRepository.db_rev() exists, but it doesn't. db_rev() exists on > CachedRepository subclasses, where changesets are cached in the database. > https://trac.edgewall.org/browser/trunk/trac/versioncontrol/cache.py#L461 > > You could try using caching for Git: > [git] cached_repository = true > You might have to setup hooks. > https://trac.edgewall.org/wiki/TracGit#hooks > > Best regards, > Peter > -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To post to this group, send email to trac-users@googlegroups.com. Visit this group at https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
Re: [Trac] Notifications on custom fields
Am Mittwoch, 4. Januar 2017 19:51:59 UTC+1 schrieb Peter Suter: Trac 1.2's new notification system would allow you to write a small > single-file plugin implementing INotificationSubscriber. > https://trac.edgewall.org/wiki/TracDev/Proposals/AdvancedNotification > https://trac.edgewall.org/wiki/TracDev/PluginDevelopment#Singlefileplugins > > https://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.INotificationSubscriber#Examples > Very interesting, thank you for these hints. I would prefer going for the modern way of 1.2 instead of making efforts to adapt to the old 1.0 way or plugin the plugin (adapting the adaption), that is AnnouncerPlugin. We already have that many Plugins that make core updates harder. Any major migration issues with 1.0 to 1.2? I'll test on a snapshot anyway. > If I understand you correctly you want notification subscriptions exactly > like the CC field provides, but for a custom field. > So I think you could basically copy the component that implements the CC > field notifications (CarbonCopySubscriber) and replace 'cc' by your > custom field name. > > https://trac.edgewall.org/browser/trunk/trac/ticket/notification.py?rev=15148=712-759#L711 > > That could look something like this (untested): > ... Is that code already something that would work as a single-file plugin.py in ./plugins already? Beside from that, a rule framework configurable on the user preferences would be preferable. I checked https://www.trac-hacks.org/wiki/MailPlugin But it can't search for custom fields as those are not in the ticket table: Invalid SQL-String: select id,summary from ticket where developer='Mo' Best regards, Mo -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To post to this group, send email to trac-users@googlegroups.com. Visit this group at https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.