Edgewall Software

Ticket #1198 (closed enhancement: fixed)

Opened 4 years ago

Last modified 3 months ago

User filter for Timeline

Reported by: mrovner@… Owned by: rblank
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@…

Description (last modified by cboos) (diff)

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

Timeline.py.diff Download (3.8 KB) - added by mrovner@… 4 years ago.
svn diff for ver 1238
timeline.cs.diff Download (0.5 KB) - added by mrovner@… 4 years ago.
svn diff for ver 1238
trac-timeline-author-1198.patch Download (16.1 KB) - added by davidf@… 13 months ago.
Patch to r7176 (0.11 branch) to enable filtering attachments by author name
1198-timeline-author-filter-r7499.patch Download (2.7 KB) - added by rblank 10 months ago.
Patch against trunk adding author filtering to timeline
1198-timeline-author-filter-r7499-0.11.patch Download (3.1 KB) - added by dfraser 4 months ago.
Added version of 0.12 patch that applies cleanly on 0.11

Change History

Changed 4 years ago by mrovner@…

svn diff for ver 1238

Changed 4 years ago by mrovner@…

svn diff for ver 1238

  Changed 4 years ago by cboos

  • owner changed from jonas to cboos
  • milestone set to 1.0

#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.

  Changed 4 years ago by mbass <matthew.bassett@…>

  • cc mbass added

  Changed 4 years ago by mbass <matthew.bassett@…>

  • cc matthew.bassett@… added; mbass removed

  Changed 4 years ago by mbass <matthew.bassett@…>

  • cc matthew.bassett@… added; matthew.bassett@… removed

  Changed 3 years ago by anonymous

  • cc matthew.bassett@… added; matthew.bassett@… removed

  Changed 3 years ago by anonymous

  • cc matthew.bassett@… added; matthew.bassett@… removed

  Changed 3 years ago by cboos

#843 has been marked as duplicate.

  Changed 3 years ago by anonymous

  • cc matthew.bassett@…, hshin@…, wfragg@…, pkou@… added; matthew.bassett@… removed

  Changed 3 years ago by Russell Hind <rhind@…>

  • 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

  Changed 3 years ago by anonymous

  • priority changed from normal to high
  • type changed from defect to enhancement
  • severity changed from normal to minor

  Changed 3 years ago by cboos

#4030 was marked as duplicate.

  Changed 3 years ago by anonymous

  • cc s.lipnevich@… added

  Changed 3 years ago by ealtin@…

  • cc ealtin@… added

  Changed 2 years ago by cboos

  • keywords user added
  • description modified (diff)
  • milestone changed from 1.0 to 0.11

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

  Changed 2 years ago by Jack Moffitt <metajack@…>

  • cc metajack@… added

  Changed 2 years ago by anonymous

  • cc m.gilbert@… added

  Changed 2 years ago by cboos

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

  Changed 2 years ago by cboos

  • cc hyugaricdeau@… added

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

  Changed 2 years ago by anonymous

  • cc marcandre.lureau@… added

  Changed 20 months ago by ijones

  • cc ijones@… added

  Changed 19 months ago by anonymous

  • cc rwargo@… added

  Changed 16 months ago by anonymous

  • cc mat@… added

  Changed 15 months ago by trac@…

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

  Changed 13 months ago by davidf@…

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...

Changed 13 months ago by davidf@…

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

  Changed 13 months ago by rhind@…

  • cc rhind@… removed

follow-up: ↓ 31   Changed 13 months ago by davidf@…

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 :-)

  Changed 12 months ago by eblot

#7460 marked as a duplicate

  Changed 12 months ago by cboos

  • owner cboos deleted
  • severity changed from minor to normal
  • milestone changed from 0.11.2 to 0.12

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 Download), 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.

  Changed 11 months ago by a.a.vykhodtsev@…

  • cc a.a.vykhodtsev@… added

  Changed 11 months ago by tapted@…

  • cc tapted@… added

Changed 10 months ago by rblank

Patch against trunk adding author filtering to timeline

in reply to: ↑ 26   Changed 10 months ago by rblank

  • keywords patch added
  • owner set to rblank

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.

  Changed 10 months ago by osimons

Tested, and works well. +1.

  Changed 10 months ago by rblank

  • status changed from new to closed
  • resolution set to fixed

Patch applied in [7504].

follow-up: ↓ 35   Changed 6 months ago by lmar

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 ; follow-up: ↓ 36   Changed 6 months ago by rblank

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   Changed 6 months ago by lmar

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.

Changed 4 months ago by dfraser

Added version of 0.12 patch that applies cleanly on 0.11

  Changed 3 months ago by debacle@…

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.

  Changed 3 months ago by debacle@…

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] :~)

Add/Change #1198 (User filter for Timeline)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from rblank. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.