trac-ticketlinks / trac / ticket / report.py

Diff from to

trac/ticket/report.py

             cell_groups = []
             row = {'cell_groups': cell_groups}
             realm = 'ticket'
+            parent_realm = ''
+            parent_id = ''
             email_cells = []
             for header_group in header_groups:
                 cell_group = []
                         email_cells.append(cell)
                     elif col == 'realm':
                         realm = value
+                    elif col == 'parent_realm':
+                        parent_realm = value
+                    elif col == 'parent_id':
+                        parent_id = value
                     cell_group.append(cell)
                 cell_groups.append(cell_group)
-            resource = Resource(realm, row.get('id'))
+            if parent_realm:
+                resource = Resource(realm, row.get('id'),
+                                    parent=Resource(parent_realm, parent_id))
+            else:
+                resource = Resource(realm, row.get('id'))
             # FIXME: for now, we still need to hardcode the realm in the action
             if resource.realm.upper()+'_VIEW' not in req.perm(resource):
                 continue
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.