Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#8696 closed enhancement (fixed)

When autostopstart is enabled, leave a comment on the active ticket

Reported by: shesek <nadav+shesek@…> Owned by: coling
Priority: normal Component: WorkLogPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


When the autostopstart option is enabled, it would be nice to leave a comment on the ticket the user was previously working on, saying that he stopped work in order to work on ....

Patch for the 0.12 version:

Index: worklog/
--- worklog/	(revision 10068)
+++ worklog/	(working copy)
@@ -135,7 +135,7 @@
         if self.config.getbool('worklog', 'autostopstart'):
             # Don't care if this fails, as with these arguments the only failure
             # point is if there is no active task... which is the desired scenario :)
-            self.stop_work()
+            self.stop_work_auto(ticket)
             self.explanation = ''
@@ -146,7 +146,9 @@
                          (self.authname, ticket,,, 0))
         return True
+    def stop_work_auto(self, new_ticket):
+        self.stop_work(comment='Stopping work on this ticket to work on #%s.' % (new_ticket))
     def stop_work(self, stoptime=None, comment=''):
         active = self.get_active_task()
         if not active:
@@ -340,4 +342,4 @@
                        'status': status,
                        'comment': comment})
         return rv
\ No newline at end of file

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by shese <nadav+shesek@…>

Now that I think about that... not quite sure why I created that stop_work_auto() method - calling stop_work() directly with the comment argument makes more sense

comment:2 Changed 3 years ago by coling

  • Resolution set to fixed
  • Status changed from new to closed

(In [10177]) Add a more detailed message when stopping one ticket to start work on another. Fixes #8696 (thanks for the patch)

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coling. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.