Edgewall Software
Modify

Opened 20 years ago

Closed 16 years ago

Last modified 16 years ago

#1198 closed enhancement (fixed)

User filter for Timeline

Reported by: mrovner@… Owned by: Remy Blank
Priority: high Milestone: 0.12
Component: timeline Version: 0.8
Severity: normal Keywords: user patch
Cc: ijones@…, matthew.bassett@…, hshin@…, wfragg@…, pkou@…, s.lipnevich@…, ealtin@…, metajack@…, m.gilbert@…, hyugaricdeau@…, marcandre.lureau@…, rwargo@…, mat@…, a.a.vykhodtsev@…, tapted@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

The two attached patches (to files Timeline.py and timeline.cs) implement user filtering for the Timeline.

If user name is entered in input field, output only lines belonging to that user.

Attachments (5)

Timeline.py.diff (3.8 KB ) - added by mrovner@… 20 years ago.
svn diff for ver 1238
timeline.cs.diff (519 bytes ) - added by mrovner@… 20 years ago.
svn diff for ver 1238
trac-timeline-author-1198.patch (16.1 KB ) - added by davidf@… 17 years ago.
Patch to r7176 (0.11 branch) to enable filtering attachments by author name
1198-timeline-author-filter-r7499.patch (2.7 KB ) - added by Remy Blank 16 years ago.
Patch against trunk adding author filtering to timeline
1198-timeline-author-filter-r7499-0.11.patch (3.1 KB ) - added by dfraser 16 years ago.
Added version of 0.12 patch that applies cleanly on 0.11

Download all attachments as: .zip

Change History (43)

by mrovner@…, 20 years ago

Attachment: Timeline.py.diff added

svn diff for ver 1238

by mrovner@…, 20 years ago

Attachment: timeline.cs.diff added

svn diff for ver 1238

comment:1 by Christian Boos, 19 years ago

Milestone: 1.0
Owner: changed from Jonas Borgström to Christian Boos

#2487 has been marked as duplicate.

Note that the patches provided on this ticket are too old for Trac 0.9.

It's not possible to achieve that with a plugin, either, because the ITimelineEventProvider currently provide only checkbox filters, which are only used to conditionally add all the events provided by that provider.

What would be needed is a new ITimelineEventFilter, which would see all the events and filter out some of them.

comment:2 by mbass <matthew.bassett@…>, 19 years ago

Cc: mbass added

comment:3 by mbass <matthew.bassett@…>, 19 years ago

Cc: matthew.bassett@… added; mbass removed

comment:4 by mbass <matthew.bassett@…>, 19 years ago

Cc: matthew.bassett@… added; matthew.bassett@… removed

comment:5 by anonymous, 19 years ago

Cc: matthew.bassett@… added; matthew.bassett@… removed

comment:6 by anonymous, 19 years ago

Cc: matthew.bassett@… added; matthew.bassett@… removed

comment:7 by Christian Boos, 19 years ago

#843 has been marked as duplicate.

comment:8 by anonymous, 19 years ago

Cc: matthew.bassett@… hshin@… wfragg@… pkou@… added; matthew.bassett@… removed

comment:9 by Russell Hind <rhind@…>, 19 years ago

Cc: rhind@… added

We've just started to have to produce logs for what work we have done each work. The timeline filtered by each user seems like an ideal place for use to be able to look back and see what a user has done.

Thanks

Russell

comment:10 by anonymous, 19 years ago

Priority: normalhigh
Severity: normalminor
Type: defectenhancement

comment:11 by Christian Boos, 18 years ago

#4030 was marked as duplicate.

comment:12 by anonymous, 18 years ago

Cc: s.lipnevich@… added

comment:13 by ealtin@…, 18 years ago

Cc: ealtin@… added

comment:14 by Christian Boos, 18 years ago

Description: modified (diff)
Keywords: user added
Milestone: 1.00.11

#4700 marked as duplicate… hm, looking at the CC: list, seems like this feature request is overdue ;)

comment:15 by Jack Moffitt <metajack@…>, 18 years ago

Cc: metajack@… added

comment:16 by anonymous, 18 years ago

Cc: m.gilbert@… added

comment:17 by Christian Boos, 18 years ago

A new patch has been contributed for 0.10, see #4964.

comment:18 by Christian Boos, 18 years ago

Cc: hyugaricdeau@… added

Another patch has been contributed for 0.11 in #5242. I'll test it and quite probably integrate it soon.

comment:19 by anonymous, 17 years ago

Cc: marcandre.lureau@… added

comment:20 by ijones, 17 years ago

Cc: ijones@… added

comment:21 by anonymous, 17 years ago

Cc: rwargo@… added

comment:22 by anonymous, 17 years ago

Cc: mat@… added

comment:23 by trac@…, 17 years ago

Is there a version of this that works for 11b1? If so where?

comment:24 by davidf@…, 17 years ago

I've just implemented this for latest trac 0.11 svn - it changes the filters API, I'm not sure if this should go into 0.11, but at least I'll make the patch available here for people…

by davidf@…, 17 years ago

Patch to r7176 (0.11 branch) to enable filtering attachments by author name

comment:25 by rhind@…, 17 years ago

Cc: rhind@… removed

comment:26 by davidf@…, 17 years ago

Note that the attached patch should handle filters in the previous format; still I'm not sure what the procedure for updating the API is.

Also, it seems that this could be implemented all inside the timeline code by simply looking at the generated author property that is part of the events tuple. Anyway, it seems to work :-)

comment:27 by Emmanuel Blot, 16 years ago

#7460 marked as a duplicate

comment:28 by Christian Boos, 16 years ago

Milestone: 0.11.20.12
Owner: Christian Boos removed
Severity: minornormal

As it's not a minor improvement, this should rather be targeted for 0.12 (at least). People that really want the feature earlier could use the patch (attachment:trac-timeline-author-1198.patch), which still applies cleanly (with some fuzz).

The approach taken in the patch is interesting. Also, this would need some deeper changes (and maybe even a different approach) to allow for multiple user or even group filtering, which are natural extensions of this feature.

comment:29 by a.a.vykhodtsev@…, 16 years ago

Cc: a.a.vykhodtsev@… added

comment:30 by tapted@…, 16 years ago

Cc: tapted@… added

by Remy Blank, 16 years ago

Patch against trunk adding author filtering to timeline

in reply to:  26 comment:31 by Remy Blank, 16 years ago

Keywords: patch added
Owner: set to Remy Blank

Replying to davidf@…:

Also, it seems that this could be implemented all inside the timeline code by simply looking at the generated author property that is part of the events tuple.

You know, this is an excellent idea! The patch above does just that.

Please test the patch and report any problems. If there are no objections, I'll apply it to trunk.

comment:32 by osimons, 16 years ago

Tested, and works well. +1.

comment:33 by Remy Blank, 16 years ago

Resolution: fixed
Status: newclosed

Patch applied in [7504].

comment:34 by lmar, 16 years ago

Is this patch actual for the 0.11.2.1 build ? I try to apply this changes to my trac and get:

Trac detected an internal error: NameError: global name 'sorted' is not defined Python Traceback Most recent call last: File "/usr/lib/python2.3/site-packages/Trac-0.11.2.1-py2.3.egg/trac/web/main.py", line 433, in _dispatch_request Code fragment:

try: if not env and env_error: raise HTTPInternalError(env_error) try: dispatcher = RequestDispatcher(env)

dispatcher.dispatch(req)

except RequestDone: pass resp = req._response or [] except HTTPException, e:

Local variables:

Name Value after [u' except RequestDone:', u' pass', u' resp = … before [u' try:', u' if not env and env_error:', u' raise … dispatcher <trac.web.main.RequestDispatcher object at 0xb68c52cc> e <exceptions.NameError instance at 0xb688faec> env <trac.env.Environment object at 0xb6da4d0c> env_error None exc_info (<class exceptions.NameError at 0xb6e7e65c>, <exceptions.NameError … filename '/usr/lib/python2.3/site-packages/Trac-0.11.2.1-py2.3.egg/trac/web/main.py' … frames [{'function': '_dispatch_request', 'lines_before': [u' try:', u' … has_admin True line u' dispatcher.dispatch(req)' lineno 432 message u"NameError: global name 'sorted' is not defined" req <Request "GET u'/timeline'"> resp [] tb <traceback object at 0xb6887e3c> tb_hide None traceback 'Traceback (most recent call last):\n File …

File "/usr/lib/python2.3/site-packages/Trac-0.11.2.1-py2.3.egg/trac/web/main.py", line 204, in dispatch Code fragment:

req.args.get('FORM_TOKEN') != req.form_token: raise HTTPBadRequest('Missing or invalid form token. ' 'Do you have cookies enabled?') # Process the request and render the template

resp = chosen_handler.process_request(req)

if resp: if len(resp) == 2: # Clearsilver chrome.populate_hdf(req) template, content_type = \

Local variables:

Name Value chosen_handler <trac.timeline.web_ui.TimelineModule object at 0xb68c548c> chrome <trac.web.chrome.Chrome object at 0xb69843ec> err (<class exceptions.NameError at 0xb6e7e65c>, <exceptions.NameError … handler <trac.timeline.web_ui.TimelineModule object at 0xb68c548c> req <Request "GET u'/timeline'"> self <trac.web.main.RequestDispatcher object at 0xb68c52cc>

File "/usr/lib/python2.3/site-packages/Trac-0.11.2.1-py2.3.egg/trac/timeline/web_ui.py", line 172, in process_request

Trac: 0.11.2.1 Python: 2.3.4 (#1, Nov 4 2004, 14:06:56) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] setuptools: 0.6c9 SQLite: 2.8.17 pysqlite: 1.0.1 Genshi: 0.5.1 mod_python: < 3.2 jQuery: 1.2.6

in reply to:  34 ; comment:35 by Remy Blank, 16 years ago

Replying to lmar:

Is this patch actual for the 0.11.2.1 build ?

No, the patch was applied to trunk. However, the error you get is due to sorted() not being present in Python 2.3. Strangely, that function is called nowhere in the patch above, so the error is probably not due to the patch. Your best bet at this point is to upgrade to Python 2.4.

in reply to:  35 comment:36 by lmar, 16 years ago

Replying to rblank:

No, the patch was applied to trunk. However, the error you get is due to sorted() not being present in Python 2.3. Strangely, that function is called nowhere in the patch above, so the error is probably not due to the patch. Your best bet at this point is to upgrade to Python 2.4.

Yes, it's work on my home system with trac 0.11.2.1 + python 2.5.

by dfraser, 16 years ago

Added version of 0.12 patch that applies cleanly on 0.11

comment:37 by debacle@…, 16 years ago

The latest patch seems not to work with trac 0.11.1. If I filter for my user name, I still see entries of other users, e.g. changed wiki pages or closed tickets.

comment:38 by debacle@…, 16 years ago

Sorry, false alarm: The patch is OK, and I accidently messed with the code. This feature is really nice and should go into 0.11.[something] :~)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.