Opened 13 years ago
Last modified 7 years ago
#8653 closed defect
Backlog Plugin stop trac from functioning — at Version 4
Reported by: | anonymous | Owned by: | Bart Ogryczak |
---|---|---|---|
Priority: | normal | Component: | BacklogPlugin |
Severity: | normal | Keywords: | |
Cc: | Anna Nachesa | Trac Release: | 0.12 |
Description (last modified by )
Hello Bart,
First ty for making this plugin I really look forward to getting it working.
Please note this is trac 0.12
I initially downloaded this zipped plugin extracted and attempted to install.
this yielded:
easy_install 0.11 Processing 0.11 Running setup.py -q bdist_egg --dist-dir /root/backlogplugin/0.11/egg-dist-tmp-1Co9jy File "build/bdist.linux-x86_64/egg/backlog/model.py", line 158 (ordered_tickets if ticket['tkt_order'] is not None else unordered_tickets).append(ticket) ^ SyntaxError: invalid syntax Adding BacklogPlugin 0.1.33 to easy-install.pth file Installed /usr/lib/python2.4/site-packages/BacklogPlugin-0.1.33-py2.4.egg Processing dependencies for BacklogPlugin==0.1.33 Finished processing dependencies for BacklogPlugin==0.1.33 So I broke out the compound if statement via: if ticket['tkt_order'] is not None: ordered_tickets.append(ticket) else: unordered_tickets.append(ticket) This allowed it to build: easy_install 0.11 Processing 0.11 Running setup.py -q bdist_egg --dist-dir /root/backlogplugin/0.11/egg-dist-tmp-j1xkIT BacklogPlugin 0.1.33 is already the active version in easy-install.pth Installed /usr/lib/python2.4/site-packages/BacklogPlugin-0.1.33-py2.4.egg Processing dependencies for BacklogPlugin==0.1.33 Finished processing dependencies for BacklogPlugin==0.1.33 Upon enabling the plugin though trac is not happy with the stack trace below: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 511, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 237, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.4/site-packages/trac/admin/web_ui.py", line 80, in process_request panels, providers = self._get_panels(req) File "/usr/lib/python2.4/site-packages/trac/admin/web_ui.py", line 163, in _get_panels p = list(provider.get_admin_panels(req) or []) File "/usr/lib/python2.4/site-packages/trac/ticket/admin.py", line 45, in get_admin_panels if 'TICKET_ADMIN' in req.perm: File "/usr/lib/python2.4/site-packages/trac/perm.py", line 553, in has_permission return self._has_permission(action, resource) File "/usr/lib/python2.4/site-packages/trac/perm.py", line 566, in _has_permission decision = PermissionSystem(self.env). \ File "/usr/lib/python2.4/site-packages/trac/perm.py", line 454, in check_permission perm) File "/usr/lib/python2.4/site-packages/trac/perm.py", line 285, in check_permission permissions = PermissionSystem(self.env). \ File "/usr/lib/python2.4/site-packages/trac/perm.py", line 359, in get_user_permissions actions += list(requestor.get_permission_actions() or []) File "/usr/lib/python2.4/site-packages/trac/perm.py", line 476, in get_permission_actions for action in requestor.get_permission_actions() or []: File "build/bdist.linux-x86_64/egg/backlog/web_ui.py", line 258, in get_permission_actions File "build/bdist.linux-x86_64/egg/backlog/model.py", line 278, in __init__ AttributeError: 'BacklogList' object has no attribute 'env'
Please advise as I would totally love to try this out and provide feedback.
Thanks again,
Jesse
Change History (4)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
OK. So I fixed the self.env problem by adding self.env = env
to the BackLogError class __init__
method. Now, I get the following error:
TimeoutError: Unable to get database connection within 0 seconds. (<trac.core.TracError instance at 0x8fb9d8c>)
This only appears when I try to open the BackLog tab. The Management Tab works OK now as do the other tabs. Will keep working this until I get this working or someone beats me to it. :)
Wes Brown.
comment:3 Changed 12 years ago by
OK, so everyone doesn't have to go through what I went through, here's the deal if you're using 0.12.2. I had to add the divide by 1000000 to the backlog.html page where the statement using the date from the ticket. This is because of the higher resolution time stamps given to tickets in 0.12.2. So, be aware. Here is the line of code I changed:
<td style="width: 60px;">${str(datetime.now() - datetime.fromtimestamp(ticket.time/1000000)).split(',')[0].split('.')[0]}</td>
This line occurs twice in the html template file so make sure you change it in both places. Also, make sure you change the permissions back to apache:apache if your using apache to run your Trac server. Otherwise, you'll get the error regarding the database access denied problem. I've also hacked quite a few of the other plugins and macros so they'd work with 0.12.2 as well as meet our specific needs where I'm working.
comment:4 Changed 12 years ago by
Description: | modified (diff) |
---|
I'm seeing the same thing. Did the same thing you did to get past the compile error and now have the
env
error. I assume this works elsewhere and it doesn't appear to be a python or trac version error since theenv
appears to be an attribute ofself
(BacklogList
object) in this case. So, does anyone know if everything is zipped up that is supposed to be. I would really like to use this module for burn down. BTW, I'm running with Python 2.4.3 and Trac 0.12.2 right now on a CentOS5 machine.Thank-you, Respectfully, Wes Brown/SCCM/SQA.