Edgewall Software
Modify

Opened 8 years ago

Closed 8 years ago

#10338 closed defect (fixed)

Deleting first ticket change does not reset changetime correctly

Reported by: osimons Owned by: osimons
Priority: normal Milestone: 0.12.3
Component: ticket system Version: 0.12dev
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:

Description

The change in #3641 / [9270] works fine as long as earlier ticket changes exist. However, if no such ticket change then exist, the changetime will be set to NULL.

If so, the # Fix the last modification time part of Ticket.delete_change() needs to use time from ticket instead of ticket_change so that last modified will be set to time of ticket creation.

Attachments (0)

Change History (5)

comment:1 by osimons, 8 years ago

Meaning "first and only" ticket change of course - which also makes it the "last" change I suppose :-)

Anyway…:

  1. Create a ticket
  2. Make one change
  3. Delete the change
  4. Observe that ticket is "last modified" 42 years ago

comment:2 by Remy Blank, 8 years ago

Good catch Simon. We could maybe get away with simply adding UNION SELECT time FROM ticket WHERE id=%s to the sub-query (and passing the additional self.id argument), or possibly use COALESCE().

Do you want to fix that yourself, or should I look into it?

comment:3 by osimons, 8 years ago

Using UNION works for me.

comment:4 by osimons, 8 years ago

Owner: set to osimons

Might as well attempt to commit again…

comment:5 by osimons, 8 years ago

Resolution: fixed
Status: newclosed

Done. [10792] for 0.12-stable, merged to trunk in [10793].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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