Modify

Opened 11 years ago

Last modified 7 years ago

#10904 new defect

Components and Version filtering not working in Screenshots view.

Reported by: jrspruitt@… Owned by:
Priority: normal Component: ScreenshotsPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

Opening up the Screenshots page, I noticed the filter section, the Components and Versions were not showing up. I tracked it down to context.cursor being passed instead of just context to api.get_components and api.get_versions.

$ diff -rupN 0.12/tracscreenshots/core.py 0.12.stock/tracscreenshots/core.py

--- 0.12/tracscreenshots/core.py	2013-03-03 19:36:51.000000000 -0800
+++ 0.12.stock/tracscreenshots/core.py	2010-09-20 12:56:24.000000000 -0700
@@ -556,9 +556,9 @@ class ScreenshotsCore(Component):
 
                 # Get all available components and versions.
                 components = [self.none_component] + api.get_components(
-                  context)
+                  context.cursor)
                 versions = [self.none_version] + api.get_versions(
-                  context)
+                  context.cursor)
 
                 # Get enabled components, versions and filter relation from
                 # request or session.

Attachments (0)

Change History (3)

comment:1 Changed 11 years ago by Steffen Hoffmann

Works for me with Trac-1.0.1 here.

Are you sure, that the respective user has been granted 'SCREENSHOTS_FILTER' permission to actually enable him/her to modify filters? Otherwise your description would be fine, because default settings will be applied for non-privileged users.

comment:2 Changed 11 years ago by jrspruitt@…

First off I apologize as I got that patch backwards, it should be replace context.cursor with context.

I reverted my patch back to normal, and double checked, my user, also site admin, has the permission suggested.

Also to clarify, the part not showing up, is the versions and components I've added. The only checkbox option available is none.

Thanks for looking into this.

comment:3 Changed 7 years ago by Ryan J Ollos

Owner: Radek Bartoň deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


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

 
Note: See TracTickets for help on using tickets.