Edgewall Software

Ticket #5441: web_ui_timeline.diff

File web_ui_timeline.diff, 1.3 KB (added by anonymous, 5 years ago)
  • web_ui.py

     
    206206                        info += ': ' 
    207207            else: 
    208208                return None 
    209             kind, verb = status_map[status] 
     209            if status in status_map: 
     210                kind, verb = status_map[status] 
     211            else: # non-standard status 
     212                info = tag('status changed from ', tag.i(comment), ' to ', tag.i(status), tag.br()) 
     213                comment = None 
     214                kind = 'editedticket' 
     215                verb = 'updated' 
    210216            title = ctx.format_summary(summary, status, resolution, type) 
    211217            title = tag('Ticket ', tag.em(ctx.shortname(), title=title), 
    212218                        ' (', shorten_line(summary), ') ', verb) 
     
    249255                if field == 'comment': 
    250256                    comment = newvalue 
    251257                    cid = oldvalue and oldvalue.split('.')[-1] 
    252                 elif field == 'status' and newvalue in ('reopened', 'closed'): 
     258                elif field == 'status': # anything is good 
    253259                    status = newvalue 
     260                    comment = oldvalue 
    254261                else: 
    255262                    fields[field] = newvalue 
    256263            if previous_update: