Show
Ignore:
Timestamp:
04/23/08 14:26:42 (7 months ago)
Author:
asmodai
Message:

Fix timestamp issues.

Submitted by: jborg

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ticketdeleteplugin/0.11/ticketdelete/web_ui.py

    r3526 r3543  
    185185            else: 
    186186                custom_fields = [f['name'] for f in ticket.fields if f.get('custom')] 
    187                 if field != "comment" and not [1 for time, author, field2, oldval, newval, _ in ticket.get_changelog() if time > ts and field == field2]: 
    188                     oldval = [old for _, _, field2, old, _, _ in ticket.get_changelog(ts) if field2 == field][0] 
     187                if field != "comment" and not [1 for time, author, field2, oldval, newval, _ in ticket.get_changelog() if to_timestamp(time) > int(ts) and field == field2]: 
     188                    oldval = [old for _, _, field2, old, _, _ in ticket.get_changelog(to_datetime(int(ts))) if field2 == field][0] 
    189189                    if field in custom_fields: 
    190190                        cursor.execute("UPDATE ticket_custom SET value=%s WHERE ticket=%s AND name=%s", (oldval, id, field))