Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#8696 closed enhancement (fixed)

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

Reported by: HumanInternals Owned by: Colin Guthrie
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 6 years ago by HumanInternals

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 6 years ago by Colin Guthrie

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Colin Guthrie.
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.