#12627 closed enhancement (fixed)
Call TracHoursPlugin directly instead of posting comments
Reported by: | Robert Becker | Owned by: | Robert Becker |
---|---|---|---|
Priority: | normal | Component: | WorkLogPlugin |
Severity: | normal | Keywords: | |
Cc: | trac-hacks.org@… | Trac Release: |
Description (last modified by )
I have created a small patch which calls the corresponding method of TracHoursPlugin
directly to post the worked time instead of creating a comment which is to be parsed by TracHoursByComment
.
This may cause hours to be counted twice if (Circumvented by changing the output format a bit if TracHours is enabled)
WorkLogPlugin
is set to create comments and TracHoursByComment
is enabled. If noted in the wiki I think this is a rather light tradeoff for being able to skip comments at all. Alternatively the comment message could be changed to "worked X hours and Y minutes" which won't be parsed by TracHoursByComment
.
Attachments (3)
Change History (14)
comment:1 follow-up: 2 Changed 9 years ago by
comment:2 Changed 9 years ago by
Replying to roben:
Adding an attachment did not work:
Trac detected an internal error: OSError: [Errno 13] Permission denied: '/srv/trac-hacks.org/trac/files/attachments/ticket/719/71924e41595afe78e108a402bff1b0b2334873e3'
Should be fixed now. Could you please try uploading the attachment again to confirm?
Changed 9 years ago by
Attachment: | manager.py.diff added |
---|
Changed 9 years ago by
Attachment: | manager.py.2.diff added |
---|
comment:4 Changed 9 years ago by
I have updated the patch to disable the "Stopping work on this ticket to start work on #XXX." comment if comments are set to be disabled in the configuration.
comment:5 Changed 8 years ago by
*bump*
It would really be great if you could incorporate this patch which really improves the plugin's behaviour when no comments are desired.
comment:6 Changed 8 years ago by
Owner: | Colin Guthrie deleted |
---|
Changed 8 years ago by
Attachment: | manager.py.patch added |
---|
I have updated my patch to add the comment message to the trachours log. Also, if comments are enabled, the worklog message will be added again, but with a decimal hours representation to prevent parsing.
comment:7 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:8 Changed 7 years ago by
Owner: | set to Ryan J Ollos |
---|---|
Status: | new → accepted |
comment:10 Changed 7 years ago by
Owner: | changed from Ryan J Ollos to Robert Becker |
---|
Adding an attachment did not work:
I have uploaded the diff file here: http://pastebin.com/UQ5J8smT