Skip to content

Commit

Permalink
Added notification to user everytime a bug is assigned to the user.
Browse files Browse the repository at this point in the history
  • Loading branch information
bijur@grep-i.com authored and bijur@grep-i.com committed Jun 2, 2011
1 parent 589e490 commit e9dd73b
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 36 deletions.
7 changes: 7 additions & 0 deletions db.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ def getUserName(conn, user_id):

return result

def getUserEmail(conn, user_id):

query = """select email_id from users where user_id = """+str(user_id)
result = runSql(query,conn)[0]

return result


def getUsers(conn):

Expand Down
Binary file removed db.pyc
Binary file not shown.
31 changes: 0 additions & 31 deletions readfile.py

This file was deleted.

22 changes: 21 additions & 1 deletion static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,24 @@ h4.nav-title{
pre {

white-space: pre-wrap
}
}

div.footer{
width: 600px;
margin-right: auto;
margin-left: auto;
text-align: center;
border-top: 1px;
border-right: 0;
border-left: 0;
border-bottom: 0;
border-color: #345;
border-style:dotted;

}

p.footer{
font-size: 60%;
color: #345;
}

5 changes: 4 additions & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#our own modules from this project

import db

import emails

# configuration

Expand Down Expand Up @@ -189,6 +189,9 @@ def bug():
# changedString += "** Changed Description from "+bugh['description']+" to "+ bug['description'] + "\n"

if bugh['assigned_to_user_id'] <> bug['assigned_to_user_id']:
to = db.getUserEmail(g.db,bug['assigned_to_user_id'])
debug('Sending email to notify assignation to : '+to)
emails.bugAssignNotify(bug, to)
changedString += "** Changed Assigned from "+ bugh['assigned_to_username'] + " to "+ request.form['assigned_to_username'] + "\n"

if bugh['description'] <> bug['description']:
Expand Down
5 changes: 5 additions & 0 deletions templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ <h1><a href="/">Bug Database</a></h1>



<div class=footer>

<p class=footer>Copyright : Bijur Vallarkodath. Released under GPL v3</p>

</div>
8 changes: 5 additions & 3 deletions templates/register.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{% extends "layout.html" %}
{% block body %}
<h3>Register with your Email here</h3>
<table>
<form name=registerform method=POST>

<p>Email <input type=text name=email_id /></p>
<p>Password <input type=password name=password /></p>
<input type=submit>
<tr><td>Email</td><td> <input type=text name=email_id /></td></tr>
<tr><td>Password</td><td> <input type=password name=password /></td></tr>
<tr><td>&nbsp;</td><td><input type=submit></td></tr>

</form>

</table>
{% endblock %}

0 comments on commit e9dd73b

Please sign in to comment.