aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.be/bugs/0be47243-c172-4de9-b71b-d5dea60f91d5/values49
-rw-r--r--.be/bugs/cfb52b6c-d1a6-4018-a255-27cc1c878193/values49
-rwxr-xr-xcfbe.py32
-rw-r--r--static/style/cfbe.css8
-rw-r--r--templates/base.html8
-rw-r--r--templates/bug.html75
6 files changed, 208 insertions, 13 deletions
diff --git a/.be/bugs/0be47243-c172-4de9-b71b-d5dea60f91d5/values b/.be/bugs/0be47243-c172-4de9-b71b-d5dea60f91d5/values
new file mode 100644
index 0000000..93bc968
--- /dev/null
+++ b/.be/bugs/0be47243-c172-4de9-b71b-d5dea60f91d5/values
@@ -0,0 +1,49 @@
+
+
+
+assigned=Steve Losh <steve@stevelosh.com>
+
+
+
+
+
+
+creator=Steve Losh <steve@stevelosh.com>
+
+
+
+
+
+
+severity=minor
+
+
+
+
+
+
+status=open
+
+
+
+
+
+
+summary=Fix the null creation date bug. See bug ee6 in the BE repo for an example that breaks things.
+
+
+
+
+
+
+target=alpha
+
+
+
+
+
+
+time=Sun, 01 Feb 2009 21:26:49 +0000
+
+
+
diff --git a/.be/bugs/cfb52b6c-d1a6-4018-a255-27cc1c878193/values b/.be/bugs/cfb52b6c-d1a6-4018-a255-27cc1c878193/values
new file mode 100644
index 0000000..49fa830
--- /dev/null
+++ b/.be/bugs/cfb52b6c-d1a6-4018-a255-27cc1c878193/values
@@ -0,0 +1,49 @@
+
+
+
+assigned=Steve Losh <steve@stevelosh.com>
+
+
+
+
+
+
+creator=Steve Losh <steve@stevelosh.com>
+
+
+
+
+
+
+severity=minor
+
+
+
+
+
+
+status=open
+
+
+
+
+
+
+summary=Change the write operations to be inline/AJAJ operations.
+
+
+
+
+
+
+target=beta
+
+
+
+
+
+
+time=Sun, 01 Feb 2009 21:15:35 +0000
+
+
+
diff --git a/cfbe.py b/cfbe.py
index 0a8db77..9724fe7 100755
--- a/cfbe.py
+++ b/cfbe.py
@@ -23,19 +23,22 @@ class WebInterface:
self.repository_name = self.bd.root.split('/')[-1]
def get_common_information(self):
- possible_assignees = list(set([bug.assigned for bug in self.bd if bug.assigned != None]))
+ possible_assignees = list(set([bug.assigned for bug in self.bd if unicode(bug.assigned) != 'None']))
possible_assignees.sort(key=unicode.lower)
- possible_targets = list(set([bug.target for bug in self.bd if bug.target != None]))
+ possible_targets = list(set([bug.target for bug in self.bd if unicode(bug.target) != 'None']))
possible_targets.sort(key=unicode.lower)
possible_statuses = [u'open', u'assigned', u'test', u'unconfirmed',
- u'wishlist', u'closed', u'disabled', u'fixed',
- u'wontfix']
+ u'closed', u'disabled', u'fixed', u'wontfix']
+
+ possible_severities = [u'minor', u'serious', u'critical', u'fatal',
+ u'wishlist']
return {'possible_assignees': possible_assignees,
'possible_targets': possible_targets,
'possible_statuses': possible_statuses,
+ 'possible_severities': possible_severities,
'repository_name': self.repository_name,}
def filter_bugs(self, status, assignee, target):
@@ -77,6 +80,7 @@ class WebInterface:
assignees=common_info['possible_assignees'],
targets=common_info['possible_targets'],
statuses=common_info['possible_statuses'],
+ severities=common_info['possible_severities'],
repository_name=common_info['repository_name'])
@@ -94,6 +98,7 @@ class WebInterface:
assignees=common_info['possible_assignees'],
targets=common_info['possible_targets'],
statuses=common_info['possible_statuses'],
+ severities=common_info['possible_severities'],
repository_name=common_info['repository_name'])
@@ -117,7 +122,26 @@ class WebInterface:
raise cherrypy.HTTPRedirect('/bug?id=%s' % (shortname,), status=302)
+ @cherrypy.expose
+ def edit(self, id, status, target, assignee, severity, summary=''):
+ """The view that handles editing bug details."""
+ bug = self.bd.bug_from_uuid(id)
+ shortname = self.bd.bug_shortname(bug)
+
+ if summary.strip() != '':
+ bug.summary = summary
+ else:
+ bug.status = status if status != 'None' else None
+ bug.target = target if target != 'None' else None
+ bug.assigned = assignee if assignee != 'None' else None
+ bug.severity = severity if severity != 'None' else None
+
+ bug.save()
+
+ raise cherrypy.HTTPRedirect('/bug?id=%s' % (shortname,), status=302)
+
config = '/Users/sjl/Documents/cherryflavoredbugseverywhere/cfbe.config'
bug_root = '/Users/sjl/Desktop/be/.be'
+# bug_root = '/Users/sjl/Documents/cherryflavoredbugseverywhere/.be'
cherrypy.quickstart(WebInterface(bug_root), '/', config)
diff --git a/static/style/cfbe.css b/static/style/cfbe.css
index 2ad25fc..8c7cef9 100644
--- a/static/style/cfbe.css
+++ b/static/style/cfbe.css
@@ -23,6 +23,8 @@ span#filters a { margin-left: 1.5em; }
a:link, a:visited, a:active { color: #d03; text-decoration: none; font-weight: bold; }
a:hover { color: #60b305; }
+.header-with-link { display: inline-block; }
+.header-link { margin-left: 1em; }
table#bug-list { width: 100%; border-collapse: collapse; border: 0.084em solid #ccc; }
table#bug-list td, table#bug-list th { border: 0em; border-bottom: 0.084em solid #ccc; text-align: left; }
@@ -48,4 +50,8 @@ form#create-form input#create-summary { width: 30em; font-weight: 700; }
form#create-form button#create-button { }
form#add-comment-form { display: none; margin-top: 1.5em; }
-p#add-comment-link {margin-top: 1.5em; } \ No newline at end of file
+p#add-comment-link {margin-top: 1.5em; }
+
+form#bug-details-edit-form { display: none; }
+form#bug-details-edit-form label { font-weight: 700; width: 7.5em; margin-left: 0em; margin-right: 1em; text-align: right; }
+form#bug-details-edit-form .field { padding-left: 0em;} \ No newline at end of file
diff --git a/templates/base.html b/templates/base.html
index c860e65..2503224 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -36,15 +36,11 @@
e.preventDefault();
});
- $('#add-comment').click(function(e) {
- $('#add-comment-link').hide();
- $('#add-comment-form').fadeIn('fast');
- e.preventDefault();
- });
-
$('table tr:odd').addClass('stripe');
});
</script>
+
+ {% block script %}{% endblock %}
</head>
<body>
diff --git a/templates/bug.html b/templates/bug.html
index 2cdbb28..01a2476 100644
--- a/templates/bug.html
+++ b/templates/bug.html
@@ -4,11 +4,38 @@
Bug {{ bd.bug_shortname(bug) }} &ndash; {{ bug.summary }}
{% endblock %}
+{% block script %}
+ <script type="text/javascript">
+ $(function() {
+ $('#add-comment').click(function(e) {
+ $('#add-comment-link').hide();
+ $('#add-comment-form').fadeIn('fast');
+ e.preventDefault();
+ });
+
+ $('#edit-bug-details').click(function(e) {
+ $('#bug-details').hide();
+ $('#bug-details-edit-form').fadeIn('fast');
+ e.preventDefault();
+ });
+
+ $('#bug-details-edit-status option[value="{{ bug.status }}"]').attr('selected', 'yes');
+ $('#bug-details-edit-target option[value="{{ bug.target }}"]').attr('selected', 'yes');
+ $('#bug-details-edit-assignee option[value="{{ bug.assigned }}"]').attr('selected', 'yes');
+ $('#bug-details-edit-severity option[value="{{ bug.severity }}"]').attr('selected', 'yes');
+ });
+ </script>
+{% endblock %}
+
{% block content %}
<p class="creation-info">Created on {{ bug.time|datetimeformat }} by {{ bug.creator|e }}</p>
- <h3>Bug Details</h3>
- <p>
+ <h3 class="header-with-link">Bug Details</h3>
+ <span class="header-link">
+ <a href="" id="edit-bug-details">edit</a>
+ </span>
+
+ <p id="bug-details">
<span class="detail-field-header">Status:</span>
<span class="detail-field-contents">{{ bug.status }}</span><br />
@@ -25,6 +52,50 @@
<span class="detail-field-contents">{{ bug.uuid }}</span><br />
</p>
+ <form id="bug-details-edit-form" class="horizontal" action="/edit" method="post">
+ <fieldset>
+ <input type="hidden" name="id" value="{{ bug.uuid }}" />
+ <div class="field">
+ <label for="bug-details-edit-status">Status:</label>
+ <select id="bug-details-edit-status" name="status">
+ {% for status in statuses %}
+ <option value="{{ status }}">{{ status }}</option>
+ {% endfor %}
+ </select>
+ </div>
+ <div class="field">
+ <label for="bug-details-edit-severity">Severity:</label>
+ <select id="bug-details-edit-severity" name="severity">
+ {% for severity in severities %}
+ <option value="{{ severity }}">{{ severity }}</option>
+ {% endfor %}
+ </select>
+ </div>
+ <div class="field">
+ <label for="bug-details-edit-target">Scheduled for:</label>
+ <select id="bug-details-edit-target" name="target">
+ <option value="None">Unscheduled</option>
+ {% for target in targets %}
+ <option value="{{ target }}">{{ target }}</option>
+ {% endfor %}
+ </select>
+ </div>
+ <div class="field">
+ <label for="bug-details-edit-assignee">Assigned to:</label>
+ <select id="bug-details-edit-assignee" name="assignee">
+ <option value="None">Unassigned</option>
+ {% for assignee in assignees %}
+ <option value="{{ assignee }}">{{ assignee }}</option>
+ {% endfor %}
+ </select>
+ </div>
+ <div class="buttons">
+ <button type="submit">Save Changes</button>
+ <button type="reset">Discard Changes</button>
+ </div>
+ </fieldset>
+ </form>
+
<h3>Summary</h3>
<p>
{{ bug.summary }}