Edgewall Software

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#13287 new defect (worksforme)

MS Outlook improvements for 1.4.1 does shows only empty fields — at Version 2

Reported by: laszlo.elbert@… Owned by:
Priority: normal Milestone: 1.6.1
Component: general Version: 1.4.1
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

Dear Ryan,

I updated the e-mail template by replacing the ${ticket_props} as suggested here in TracNotification#CustomizingContent, with CookBook/Notification/Templates.

--------------------------------------------------------------------------
# set sel = ('Reporter', 'Owner', 'Type', 'Status', 'Priority', 'Milestone',
             'Component', 'Severity', 'Resolution', 'Keywords')
# for a in ticket_props.replace('|', '\n').splitlines()[1:-1]|map('trim'):
#   set a = a.split(':', 1)|map('trim')|list
#   if len(a) > 1 and a[0] in sel:
${'%-*s  %s'|format(12, a[0] + ':', a[1])}
#   endif
# endfor
--------------------------------------------------------------------------

So, notification works - no error, but I have only empty fields in the e-mail as it is shown here below:

#1703: NEST for coping with bunching of regulated traffic
--------------------------------------------------------------------------
Reporter:     
Owner:        
Type:         
Status:       
Priority:     
Milestone:    
Component:    
Severity:     
Resolution:   
Keywords:     
--------------------------------------------------------------------------
Comment (by Laszlo Elbert):

 testx
-- 
Ticket URL: <https://nest-tool.eurocontrol.int/trac/nest/ticket/1703#comment:32>
NEST <https://www.eurocontrol.int/nest>
NEST project

Thanks for the advise in advance Laszlo

Change History (2)

comment:1 by Ryan J Ollos, 4 years ago

Description: modified (diff)

comment:2 by Ryan J Ollos, 4 years ago

Description: modified (diff)
Resolution: worksforme
Status: newclosed

I'm not sure, it works fine for me:

${ticket_body_hdr}
--------------------------------------------------------------------------
# set sel = ('Reporter', 'Owner', 'Type', 'Status', 'Priority', 'Milestone',
             'Component', 'Severity', 'Resolution', 'Keywords')
# for a in ticket_props.replace('|', '\n').splitlines()[1:-1]|map('trim'):
#   set a = a.split(':', 1)|map('trim')|list
#   if len(a) > 1 and a[0] in sel:
${'%-*s  %s'|format(12, a[0] + ':', a[1])}
#   endif
# endfor
--------------------------------------------------------------------------
# if ticket.new:
${ticket.description}
# else:
#   if changes_body:
${_('Changes (by %(author)s):', author=change.author)}

${changes_body}
#   endif
#   if changes_descr:
#     if not changes_body and not change.comment and change.author:
${_('Description changed by %(author)s:', author=change.author)}
#     endif
${changes_descr}
--
#   endif
#   if change.comment:

${_('Comment:') if changes_body else
  _('Comment (by %(author)s):', author=change.author)}

${change.comment}
#   endif
# endif
${'-- '}
${_('Ticket URL: <%(link)s>', link=ticket.link)}
${project.name} <${project.url or abs_href()}>
${project.descr}

Please use MailingList in the future for support inquiries, but we can take this one to completion here.

Note: See TracTickets for help on using tickets.