Commits

Tetsuya Morimoto committed 7ac9593

fixed to save proper oldvalue/newvalue in ticket_change table when the ticketref field is updated

  • Participants
  • Parent commits 5f82aa3

Comments (0)

Files changed (1)

ticketref/model.py

                 new_text = cnv_list2text(target_refs)
                 c.execute(UPDATE_TICKETREF % (new_text, ref_id))
             else:
+                new_text = ""
                 c.execute(DELETE_TICKETREF % ref_id)
             c.execute(INSERT_TICKETCHG % (
-                ref_id, self.time_stamp, author, self.ticket.id, ""))
+                ref_id, self.time_stamp, author, row.strip(), new_text))
 
     def add_cross_reference(self, refs, author):
         c = self.cursor
                     target_refs.add(self.ticket.id)
                     new_text = cnv_list2text(target_refs)
                     c.execute(UPDATE_TICKETREF % (new_text, ref_id))
-                    c.execute(INSERT_TICKETCHG % (
-                        ref_id, self.time_stamp, author, "", self.ticket.id))
+                    c.execute(INSERT_TICKETCHG % (ref_id, self.time_stamp,
+                                author, row[0].strip(), new_text))
             else:
                 c.execute(INSERT_TICKETREF % (ref_id, self.ticket.id))
                 c.execute(INSERT_TICKETCHG % (