diff options
author | W. Trevor King <wking@drexel.edu> | 2010-07-15 06:38:56 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2010-07-15 06:38:56 -0400 |
commit | 790a33a51a6281535cae338c9f64a675bb6dc6b5 (patch) | |
tree | 75b96c1412bb5f6100a9927b0aaf748c410ed246 /interfaces | |
parent | 3472f94db6fda30ab53c5f1b747095fad1ac3c3b (diff) | |
download | bugseverywhere-790a33a51a6281535cae338c9f64a675bb6dc6b5.tar.gz |
Fixed #bea/206d9b07# : 'BugDir' object has no attribute 'bug_shortname' (cfbe)
Tested with a single bug attribute change and comment addition.
Diffstat (limited to 'interfaces')
-rw-r--r-- | interfaces/web/templates/list.html | 2 | ||||
-rw-r--r-- | interfaces/web/web.py | 28 |
2 files changed, 18 insertions, 12 deletions
diff --git a/interfaces/web/templates/list.html b/interfaces/web/templates/list.html index 83007d3..216b731 100644 --- a/interfaces/web/templates/list.html +++ b/interfaces/web/templates/list.html @@ -16,7 +16,7 @@ {% for bug in bugs %} <tr> <td>{{ bug.id.user() }}</td> - <td><a href="/bug?id={{ bug.id.user() }}"> + <td><a href="/bug?{{ urlencode({'id':bug.id.long_user()}) }}"> {{ bug.summary|e|truncate(70) }}</a></td> <td>{{ bug.status }}</td> <td>{{ bug.target }}</td> diff --git a/interfaces/web/web.py b/interfaces/web/web.py index e80f676..75a430d 100644 --- a/interfaces/web/web.py +++ b/interfaces/web/web.py @@ -1,11 +1,15 @@ +from datetime import datetime +from urllib import urlencode + +from jinja2 import Environment, FileSystemLoader import cherrypy + from libbe import storage from libbe import bugdir from libbe.command.depend import get_blocks from libbe.command.util import bug_comment_from_user_id from libbe.storage.util import settings_object -from jinja2 import Environment, FileSystemLoader -from datetime import datetime + EMPTY = settings_object.EMPTY @@ -99,7 +103,8 @@ class WebInterface: targets=common_info['possible_targets'], statuses=common_info['possible_statuses'], severities=common_info['possible_severities'], - repository_name=common_info['repository_name']) + repository_name=common_info['repository_name'], + urlencode=urlencode) @cherrypy.expose @@ -145,20 +150,19 @@ class WebInterface: def comment(self, id, body): """The view that handles adding a comment.""" bug = self.bd.bug_from_uuid(id) - shortname = self.bd.bug_shortname(bug) if body.strip() != '': bug.comment_root.new_reply(body=body) bug.save() - - raise cherrypy.HTTPRedirect('/bug?id=%s' % (shortname,), status=302) - - + + raise cherrypy.HTTPRedirect( + '/bug?%s' % urlencode({'id':bug.id.long_user()}), + status=302) + @cherrypy.expose def edit(self, id, status=None, target=None, assignee=None, severity=None, summary=None): """The view that handles editing bug details.""" bug = self.bd.bug_from_uuid(id) - shortname = self.bd.bug_shortname(bug) if summary != None: bug.summary = summary @@ -169,6 +173,8 @@ class WebInterface: bug.severity = severity if severity != 'None' else None bug.save() - - raise cherrypy.HTTPRedirect('/bug?id=%s' % (shortname,), status=302) + + raise cherrypy.HTTPRedirect( + '/bug?%s' % urlencode({'id':bug.id.long_user()}), + status=302) |