Changeset 2718
- Timestamp:
- 10/26/07 05:56:48 (1 year ago)
- Files:
-
- clientsplugin/0.11/cron/send-client-email (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
clientsplugin/0.11/cron/send-client-email
r2715 r2718 45 45 from trac.util.datefmt import format_date, to_datetime 46 46 from trac.wiki import wiki_to_html 47 47 from genshi import escape 48 48 49 49 parser = OptionParser() … … 226 226 WHERE tcust.name = 'client' 227 227 AND tcust.value = %s 228 AND t.status IN ('new','assigned','reopened')228 AND t.status != 'closed' 229 229 """) 230 230 cur2 = db.cursor() … … 235 235 xml.write('<ticket>') 236 236 xml.write('<id>%s</id>' % tid) 237 xml.write('<summary>%s</summary>' % summary)237 xml.write('<summary>%s</summary>' % escape(summary)) 238 238 xml.write('<description>%s</description>' % wiki_to_html(extract_client_text(description), self.env, self.req)) 239 239 xml.write('<status>%s</status>' % status) … … 247 247 # Load in any changes that have happend 248 248 sql = ("""\ 249 SELECT t.id, t.summary, t.description, t. milestone, m.due, tchng.field, tchng.oldvalue, tchng.newvalue249 SELECT t.id, t.summary, t.description, t.status, t.milestone, m.due, tchng.field, tchng.oldvalue, tchng.newvalue 250 250 FROM ticket_custom tcust 251 251 INNER JOIN ticket t ON tcust.ticket=t.id … … 263 263 xml.write('<changes>') 264 264 lasttid = 0 265 for tid, summary, description, milestone, due, cgfield, oldvalue, newvalue in cur2:265 for tid, summary, description, status, milestone, due, cgfield, oldvalue, newvalue in cur2: 266 266 text = '' 267 267 if 'status' == cgfield: 268 text = 'Status changed from "%s" to "%s"' % (oldvalue, newvalue)268 text = 'Status changed from "%s" to "%s"' % (oldvalue, newvalue) 269 269 elif 'milestone' == cgfield: 270 text = 'Milestone changed from "%s" to "%s"- please check for revised delivery date.' % (oldvalue, newvalue)270 text = 'Milestone changed from "%s" to "%s" - please check for revised delivery date.' % (oldvalue, newvalue) 271 271 elif 'comment' == cgfield: 272 272 # Todo - extract... … … 288 288 xml.write('<ticket>') 289 289 xml.write('<id>%s</id>' % tid) 290 xml.write('<summary>%s</summary>' % summary)290 xml.write('<summary>%s</summary>' % escape(summary)) 291 291 xml.write('<description>%s</description>' % wiki_to_html(extract_client_text(description), self.env, self.req)) 292 xml.write('<status>%s</status>' % status) 292 293 xml.write('<milestone>%s</milestone>' % milestone) 293 294 xml.write('<due>%s</due>' % myformat_date(due))
