Edgewall Software
Modify

Opened 10 years ago

Last modified 6 years ago

#11577 new defect

Status is omitted in plain text emails

Reported by: Jared Bownds <jared.bownds@…> Owned by:
Priority: normal Milestone: undecided
Component: notification Version: 1.0.1
Severity: normal Keywords: msoutlook
Cc: Ryan J Ollos Branch:
Release Notes:
API Changes:
Internal Changes:

Description

We use the following three types of status' for our tickets; Defect, Task and Enhancement. When using plaintext emails with MS outlook formatting, type=Enhancement does not show up in email notifications. Any idea why this may be happening? System details are included below.

MS Outlook Formatting - ticket_notify_email.txt

--------------------------------------------------------------------------
{% with
   pv = [(a[0].strip(), a[1].strip()) for a in [b.split(':') for b in
         [c.strip() for c in
          ticket_props.replace('|', '\n').splitlines()[1:-1]] if ':' in b]];
   sel = ['Reporter', 'Owner', 'Type', 'Status', 'Department',
          'Severity', 'Resolution', 'Keywords', 'duedate'] %}\
${'\n'.join('%s\t%s' % (format(p[0]+':', ' <12'), p[1]) for p in pv if p[0] in sel)}
{% end %}\
--------------------------------------------------------------------------

Example Email with type = Enhancement

--------------------------------------------------------------------------
Reporter:   	reporter
Owner:      	owner
Type:       	
Status:     	accepted
Resolution: 	none
Keywords:   	none
Department: 	Informatics
--------------------------------------------------------------------------

System Information

Package	Version
Trac	1.0
Trac	1.0
Babel	0.9.5
Genshi	0.6 (without speedups)
mod_wsgi	3.2 (WSGIProcessGroup trac WSGIApplicationGroup trac.agraquest.int|)
pysqlite	2.4.1
Python	2.6.6 (r266:84292, Sep 4 2013, 07:46:00) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
Python	2.6.6 (r266:84292, Sep 4 2013, 07:46:00) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
pytz	2010h
pytz	2010h
setuptools	0.6c11
setuptools	0.6c11
SQLite	3.6.20
Subversion	1.6.15 (r1038135)
jQuery	1.7.2

Attachments (1)

ticket_notify_email.txt (2.3 KB ) - added by Jun Omae 10 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by Ryan J Ollos, 10 years ago

Cc: Ryan J Ollos added

The issue sounds vaguely familiar, but I can't locate any previous history of similar issues in the issue tracker or mailing list. I'm unable to reproduce, seeing:

--------------------------------------------------------------------------
Reporter:       anonymous
Owner:          somebody
Type:           defect
Status:         new
Resolution:
Keywords:
Department:     Engineering
--------------------------------------------------------------------------

What is in your [ticket-custom] section? Does the value of Type appear in the email notification if you remove your custom fields from the sel list? What if you use the unmodified snippet from TracNotification#Customizinge-mailcontentforMSOutlook?

Note that, unless you explicitly specify the lowercase form in the [ticket-custom] .label field, duedate won't appears in the emails unless you specify Duedate in the sel list.

Last edited 10 years ago by Ryan J Ollos (previous) (diff)

comment:2 by Jun Omae, 10 years ago

I guess that the issue can be reproduced if a ticket property's value has long token, even it is not type field. When the field has long token, it will wrap between the label and the value. e.g. owner and status fields in comment:4:ticket:10283.

Therefore, I think the snippet don't consider that case.

comment:3 by Ryan J Ollos, 10 years ago

I can reproduce with Trac 1.0 with ticket type EnhancementEnhancementEnhancementEnhancement. I can't reproduce for ticket type Enhancement, but perhaps the "length limit" depends on some other parameters. I'm not viewing in MS Outlook, so maybe that is a significant factor.

in reply to:  3 ; comment:4 by Jared Bownds <jared.bownds@…>, 10 years ago

Replying to rjollos:

I can reproduce with Trac 1.0 with ticket type EnhancementEnhancementEnhancementEnhancement. I can't reproduce for ticket type Enhancement, but perhaps the "length limit" depends on some other parameters. I'm not viewing in MS Outlook, so maybe that is a significant factor.

Hi there.

Are you by any chance using the customized e-mail content for MS Outlook in ticket_notify_email.txt when testing? Presently, I am still experiencing the same issue in spite of troubleshooting methods listed above.

Also, I am unable to successfully add the Cc field. I've used all available variations in the sel string, ['CC', 'cc','Cc','cC']

Your assistance is greatly appreciated. Thanks.

in reply to:  4 comment:5 by Jun Omae, 10 years ago

Also, I am unable to successfully add the Cc field. I've used all available variations in the sel string, ['CC', 'cc','Cc','cC']

That's impossible. ticket_props variable doesn't include Cc value. See tags/trac-1.0.1/trac/ticket/notification.py@:262,275#L261.

by Jun Omae, 10 years ago

Attachment: ticket_notify_email.txt added

comment:6 by Jun Omae, 10 years ago

Priority: highnormal

Try ticket_notify_email.txt. However, it doesn't work well if ticket property has | characters and I don't think it is intented that properties is generated from ticket_prop in the template.

IMO, I recommend to use fixed font even if Outlook.

Version 0, edited 10 years ago by Jun Omae (next)

comment:7 by Ryan J Ollos, 10 years ago

Milestone: undecided

comment:8 by Peter Suter, 7 years ago

Keywords: msoutlook added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.