Mercurial > p > roundup > code
comparison roundup/roundupdb.py @ 685:de6dc74a4148
make it work
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 08 Apr 2002 03:46:42 +0000 |
| parents | 5b23ff865f3a |
| children | e10c37f53efd |
comparison
equal
deleted
inserted
replaced
| 684:5b23ff865f3a | 685:de6dc74a4148 |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: roundupdb.py,v 1.50 2002-04-08 03:40:31 richard Exp $ | 18 # $Id: roundupdb.py,v 1.51 2002-04-08 03:46:42 richard Exp $ |
| 19 | 19 |
| 20 __doc__ = """ | 20 __doc__ = """ |
| 21 Extending hyperdb with types specific to issue-tracking. | 21 Extending hyperdb with types specific to issue-tracking. |
| 22 """ | 22 """ |
| 23 | 23 |
| 341 sendto.append(nosyid) | 341 sendto.append(nosyid) |
| 342 recipients.append(nosyid) | 342 recipients.append(nosyid) |
| 343 | 343 |
| 344 # we have new recipients | 344 # we have new recipients |
| 345 if sendto: | 345 if sendto: |
| 346 # map userids to addresses | |
| 347 sendto = [users.get(i, 'address') for i in sendto] | |
| 348 | |
| 346 # update the message's recipients list | 349 # update the message's recipients list |
| 347 messages.set(msgid, recipients=recipients) | 350 messages.set(msgid, recipients=recipients) |
| 348 | 351 |
| 349 # send the message | 352 # send the message |
| 350 self.send_message(nodeid, msgid, change_note, sendto) | 353 self.send_message(nodeid, msgid, change_note, sendto) |
| 370 # create one | 373 # create one |
| 371 messageid = "<%s.%s.%s%s@%s>"%(time.time(), random.random(), | 374 messageid = "<%s.%s.%s%s@%s>"%(time.time(), random.random(), |
| 372 self.classname, nodeid, self.db.config.MAIL_DOMAIN) | 375 self.classname, nodeid, self.db.config.MAIL_DOMAIN) |
| 373 messages.set(msgid, messageid=messageid) | 376 messages.set(msgid, messageid=messageid) |
| 374 | 377 |
| 375 # figure the author's id | |
| 376 authid = messages.get(msgid, 'author') | |
| 377 | |
| 378 # send an email to the people who missed out | 378 # send an email to the people who missed out |
| 379 sendto = [users.get(i, 'address') for i in sendto] | |
| 380 cn = self.classname | 379 cn = self.classname |
| 381 title = self.get(nodeid, 'title') or '%s message copy'%cn | 380 title = self.get(nodeid, 'title') or '%s message copy'%cn |
| 382 # figure author information | 381 # figure author information |
| 382 authid = messages.get(msgid, 'author') | |
| 383 authname = users.get(authid, 'realname') | 383 authname = users.get(authid, 'realname') |
| 384 if not authname: | 384 if not authname: |
| 385 authname = users.get(authid, 'username') | 385 authname = users.get(authid, 'username') |
| 386 authaddr = users.get(authid, 'address') | 386 authaddr = users.get(authid, 'address') |
| 387 if authaddr: | 387 if authaddr: |
| 618 m.insert(0, '') | 618 m.insert(0, '') |
| 619 return '\n'.join(m) | 619 return '\n'.join(m) |
| 620 | 620 |
| 621 # | 621 # |
| 622 # $Log: not supported by cvs2svn $ | 622 # $Log: not supported by cvs2svn $ |
| 623 # Revision 1.50 2002/04/08 03:40:31 richard | |
| 624 # . added a "detectors" directory for people to put their useful auditors and | |
| 625 # reactors in. Note - the roundupdb.IssueClass.sendmessage method has been | |
| 626 # split and renamed "nosymessage" specifically for things like the nosy | |
| 627 # reactor, and "send_message" which just sends the message. | |
| 628 # | |
| 629 # The initial detector is one that we'll be using here at ekit - it bounces new | |
| 630 # issue messages to a team address. | |
| 631 # | |
| 623 # Revision 1.49 2002/03/19 06:41:49 richard | 632 # Revision 1.49 2002/03/19 06:41:49 richard |
| 624 # Faster, easier, less mess ;) | 633 # Faster, easier, less mess ;) |
| 625 # | 634 # |
| 626 # Revision 1.48 2002/03/18 18:32:00 rochecompaan | 635 # Revision 1.48 2002/03/18 18:32:00 rochecompaan |
| 627 # All messages sent to the nosy list are now encoded as quoted-printable. | 636 # All messages sent to the nosy list are now encoded as quoted-printable. |
