Return-Path: X-Original-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4D7CD916A for ; Tue, 24 Jul 2012 03:10:29 +0000 (UTC) Received: (qmail 70831 invoked by uid 500); 24 Jul 2012 03:10:29 -0000 Delivered-To: apmail-incubator-bloodhound-commits-archive@incubator.apache.org Received: (qmail 70783 invoked by uid 500); 24 Jul 2012 03:10:28 -0000 Mailing-List: contact bloodhound-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bloodhound-dev@incubator.apache.org Delivered-To: mailing list bloodhound-commits@incubator.apache.org Received: (qmail 70719 invoked by uid 99); 24 Jul 2012 03:10:27 -0000 Received: from bloodhound-vm.apache.org (HELO bloodhound-vm) (140.211.11.32) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2012 03:10:27 +0000 Received: from bloodhound-vm.apache.org (localhost [127.0.0.1]) by bloodhound-vm (Postfix) with ESMTP id 1950D80A42; Tue, 24 Jul 2012 03:10:27 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit From: "Apache Bloodhound" X-Trac-Version: 0.13dev-r10952 Cc: bloodhound-commits@incubator.apache.org Auto-Submitted: auto-generated X-Mailer: Trac 0.13dev-r10952, by Edgewall Software X-Trac-Project: Apache Bloodhound Date: Tue, 24 Jul 2012 03:10:26 -0000 Reply-To: bloodhound-dev@incubator.apache.org X-URL: https://issues.apache.org/bloodhound/ Subject: Re: [Apache Bloodhound] #94: Activity area to automatically filter to show entries relevant for the view X-Trac-Ticket-URL: https://issues.apache.org/bloodhound/ticket/94#comment:3 Message-ID: <067.df761e1bb9d1ce4ab34b5daf9bb07f17@incubator.apache.org> References: <052.22eeee0ea85c3d06a3f9893c7daee2bb@incubator.apache.org> X-Trac-Ticket-ID: 94 In-Reply-To: <052.22eeee0ea85c3d06a3f9893c7daee2bb@incubator.apache.org> #94: Activity area to automatically filter to show entries relevant for the view --------------------------+----------------------- Reporter: gjm | Owner: olemis Type: enhancement | Status: accepted Priority: major | Milestone: Release 2 Component: dashboard | Version: Resolution: | Keywords: --------------------------+----------------------- Comment (by olemis): Attached patches filter timeline according to resource set in active rendering context. ==== Dashboard ==== attachment:t94_r1362098_timeline_filters_api.diff is the most important patch. It introduces two important enhamcements . Firstly , it ensures that the widget is rendered in the same context of the target view. This implies some minor changes in dashboard and widgets API consisting in mainly using a `RenderingContext` object instead of a web `Request` and also propagation of the former through a path starting from view/template code until it finally gets processed by core widget rendering engine. In second place , it adds a whole new API to filter timeline events. In order to make it work without patching ''Trac'' source code it was necessary to override parts of the timeline engine in non-trivial ways . That's mainly why it took so long to figure this out . Please consider reviewing all this . My only suggestion would be to '''move the whole timeline filters infrastructure onto a new module''' (e.g. `bhdashboard.timeline`) in order to allow for reusing it beyond activity widget source code. The other two patches implement the code needed to only show relevant ticket events in milestone view. They should be applied in the following order {{{ #!sh $ hg qapplied t94/t94_r1362098_timeline_filters_api.diff t94/t94_r1362098_timeline_filter_ticket_field.diff t94/t94_r1362098_filter_activity.diff }}} The solution is generic enough and may be reused in other scenarios for models associated to tickets via ticket fields. Two remarkable examples are version pages (i.e. #109) and product view . The filter currently relies on existing resources API to do its job. That means that afaics ''' `IResourceManager` interface must be implemented for both products and versions'''. After that work needed to upgrade activity feed is relatively simple. Should a new ticket be created in order to implement products and versions resource manager? Finally , installer has to enable filter components at installation time in order to make all this magic happen . ==== Theme ==== Just a super tiny patch in attachment:t94_r1361192_milestone_typo.diff I look forward to your comments . -- Ticket URL: Apache Bloodhound The Apache Bloodhound (incubating) issue tracker