Commits

Anonymous committed cae8ec5

[svn-9478] Ticket: make the `author` parameter optional in `Ticket.save_changes`.

Patch by Felix Schwarz on #9217.

  • Participants
  • Parent commits 2dc0207

Comments (0)

Files changed (2)

File trac/ticket/model.py

 
         return self.id
 
-    def save_changes(self, author, comment=None, when=None, db=None, cnum=''):
+    def save_changes(self, author=None, comment=None, when=None, db=None, cnum=''):
         """
         Store ticket changes in the database. The ticket must already exist in
         the database.  Returns False if there were no changes to save, True

File trac/ticket/tests/model.py

         self.assertEqual('1', comment_change[3])
         self.assertEqual('', comment_change[4])
 
+    def test_can_save_ticket_without_explicit_username(self):
+        ticket = Ticket(self.env)
+        ticket.insert()
+        
+        ticket['summary'] = 'another summary'
+        ticket.save_changes()
+        
+        for change in ticket.get_changelog():
+            self.assertEqual(None, change[1])
 
     def test_ticket_default_values(self):
         """