Opened 9 years ago
Last modified 8 years ago
#12091 closed defect
Ticket ids in batch ticket notification should be sorted — at Initial Version
Reported by: | Jun Omae | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.10 |
Component: | ticket system | Version: | |
Severity: | normal | Keywords: | notification |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Ticket ids in batch ticket notification are not sorted like this, though those are sorted in timeline view.
Batch modification to #886, #31, #53, #633, #918, #1084, #1113, #1890, #1962, ... -- Tickets URL: <http://trac.edgewall.org/query?id=886%2C31%2C53%2C633%2C918%2C1084%2C1113%2C1890%2C1962%2C2035%2C2141%2C2463%2C3332%2C3386%2C3470%2C....
-
trac/ticket/notification.py
diff --git a/trac/ticket/notification.py b/trac/ticket/notification.py index d34e3ee..35b334b 100644
a b class BatchTicketNotifyEmail(NotifyEmail): 545 545 self._notify(tickets, new_values, comment, action, author) 546 546 547 547 def _notify(self, tickets, new_values, comment, action, author): 548 tickets = sorted(tickets) 548 549 self.tickets = tickets 549 550 self.reporter = '' 550 551 self.owner = '' 551 changes_descr = '\n'.join( ['%s to %s' % (prop, val)552 for (prop, val) in new_values.iteritems()])553 tickets_descr = ', '.join( ['#%s' % t for t in tickets])552 changes_descr = '\n'.join('%s to %s' % (prop, val) 553 for (prop, val) in new_values.iteritems()) 554 tickets_descr = ', '.join('#%s' % t for t in tickets) 554 555 subject = self.format_subj(tickets_descr) 555 link = self.env.abs_href.query(id=','.join( [str(t) for t in tickets]))556 link = self.env.abs_href.query(id=','.join(str(t) for t in tickets)) 556 557 self.data.update({ 557 558 'tickets_descr': tickets_descr, 558 559 'changes_descr': changes_descr,
Another suggestions for batch ticket notification mail:
- Add unit tests. It doesn't seem to be no unit tests.
- Add
Message-ID
header. Currently, SMTP server probably adds the header.
Note:
See TracTickets
for help on using tickets.