Opened 5 years ago
Last modified 16 months ago
#13732 accepted enhancement
Enable TimingAndEstimationPlugin on Trac 1.4 - actually not a question
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | TimingAndEstimationPlugin |
Severity: | normal | Keywords: | patch |
Cc: | Trac Release: | 1.4 |
Description
I have tried to install almost all of the plugins for time tracking... but I am only interested on TimingAnEstimationPlugin, so i would like to make it run. Luckily I could.
Latest updates on trac-hacks seem this plugin not to be maintaned so far.
I could make it run too simple, as I am not fluent on Python.
Errors if you follow current installation steps:
- Trac[loader] ERROR: Skipping "timingandestimationplugin = timingandestimationplugin": ImportError: No module named genshi.core
- OperationalError: table wiki has no column named ipnr
Steps to have it running (for as an ignorant as me):
First error can be fixed installing genshi
- >pip install genshi
Second error can be fixed modifying lines 196 and 197 of ./timingandestimationplugin/api.py
- 196 remove 'ipnr,'
- 197 remove '127.0.0.1,'
- install genshi pip install genshi
- download Zipped source for plugin for Trac 1.0 (it is the same link as on plugin's wiki)
- unzip on a folder an move to that folder
- Modify ./timingandestimationplugin/api.py
- build the source python setup.py build
- install the source python setup.py install
- upgrade track trac-admin YOUR_TRAC_PROJECT upgrade
- upgrade wiki trac-admin YOUR_TRAC_PROJECT wiki upgrade
Please, note that this is a quick&dirty turnaround, not THE solution.
Attachments (5)
Change History (19)
Changed 4 years ago by
Attachment: | timingandestimationplugin_branch10_patch_for_trac_142.patch added |
---|
Patch for timingandestimationplugin (branch for trac 1.0) to fix runtime problems, plus remove filter_stream() and move filter operation to JavaScript, plus port billing template to Jinja. Seems to work; YMMV.
comment:2 Changed 4 years ago by
Keywords: | patch added |
---|
comment:3 follow-up: 4 Changed 4 years ago by
api.py needs quotes around the mysql 8.0.3 reserved word system in requests: `system`
comment:4 Changed 4 years ago by
Replying to anonymous:
api.py needs quotes around the mysql 8.0.3 reserved word system in requests:
`system`
If that's the case, for cross-db compatibility we can use db.quote('system')
. Example: browser:tags/trac-1.4.2/trac/db/api.py@:432#L421.
comment:5 follow-up: 7 Changed 4 years ago by
@Russ Tyndall
If you are ok with it, I'll apply the attached patch and modify the plugin to work with recent Trac releases.
comment:6 Changed 3 years ago by
Hi Cinc-th, I for one would really appreciate if you apply the patch and help this plugin to work with recent Trac releases... esp py3 if possible.
Thanks for all your hard work on Trac and various plugins. It is appreciated!
Also, I suspect your @Russ Tyndall has to be @bobbysmith007 ?
Cheers!
comment:7 Changed 3 years ago by
Replying to Cinc-th:
@Russ Tyndall
If you are ok with it, I'll apply the attached patch and modify the plugin to work with recent Trac releases.
If there is no reply from the plugin owner saying the plugin is still being maintained, we should go ahead and apply the patch. I'll wait a few more days to be sure.
comment:8 Changed 3 years ago by
Owner: | changed from Russ Tyndall to Ryan J Ollos |
---|---|
Status: | new → accepted |
comment:9 Changed 3 years ago by
Hi Cinc-th and Ryan J Ollos,
Do you know if the patch was ever applied?
Also, I would love to migrate to Trac 1.5. Do you think the only issue with the patched plugin working on 1.5 would be py3 issues? I am not familiar enough with the differences from 1.4 to 1.5 to know if other issues would be expected to crop up.
Thanks for all your hard work on trac!
Changed 3 years ago by
Attachment: | timingandestimationplugin_branch10_patch_for_trac_154.patch added |
---|
Patches to run on 1.5.4
comment:10 Changed 3 years ago by
I just updated this plugin recently. I suppose I should have checked the activity here first. I attached a patch of what I'm currently using.
I updated my installation to run on Python 3 with Trac 1.5.4. I also added a patch from a different ticket regarding the database handling.
I hope this helps. Maybe it's too late lol.
comment:11 Changed 3 years ago by
Can you cross-reference the other ticket(s) you are referring to? That will help to do ticket triage.
Changed 3 years ago by
Attachment: | timingandestimationplugin_py3_trac154.patch added |
---|
comment:12 Changed 3 years ago by
I have updated my Trac plugins sporadically over the years. Sometimes when I start using a new plugin I apply all the patches that are still not applied that seem valid. That's why the patch is not just for compatibility, but includes the other patches as well. But it's probably been years since I applied them, so I don't even remember doing it.
comment:13 Changed 19 months ago by
Since i try to get this plugin working with 1.5.x i looked at the patch and implemented stuff i haven't done already and now i am at a point where the plugin gets loaded and seems to at least work partly.
Now I am at the point where I need7want to migrate the code from filter_stream into js but since I am not a javascript dude I have a hard time figuring where to put the code in the js files.
for example blackmagic.py has a few helper functions that should move to js according to the migration guide but do i make a seperate js file like blackmagic.js for it or do i put it in ticket.js since the code is related to the ticket part of the plugin ?
some pointers would be helpful here!
cheers
Markus
comment:14 Changed 16 months ago by
tried to get this running in a docker with Trac 1.4.2. It worked partially, but the administration interface reports a UTF-8 error, so it's not really usable. Is anyone still maintaining this plugin or is it dead?
Changed 6 months ago by
Attachment: | timingandestimationplugin_py3_trac162.patch added |
---|
The patch mentioned in comment:11 (timingandestimationplugin_py3_trac154.patch) almost works for Trac 1.6.2, except that on the Management page when you attempt to "Set Billing Date" the following error is produced because of a missing CSRF token in the submitted form: "Missing or invalid form token. Do you have cookies enabled?" This can be fixed by adding the line ${jmacros.form_token_input()}
to the trac1.0/timingandestimationplugin/templates/billing_jinja.html file. This is the resulting cumulative patch.
Changed 6 months ago by
Attachment: | timingandestimationplugin_py3_trac162.2.patch added |
---|
The patch mentioned in comment:11 (timingandestimationplugin_py3_trac154.patch) almost works for Trac 1.6.2, except that on the Management page when you attempt to "Set Billing Date" the following error is produced because of a missing CSRF token in the submitted form: "Missing or invalid form token. Do you have cookies enabled?" This can be fixed by adding the line ${jmacros.form_token_input()
} to the trac1.0/timingandestimationplugin/templates/billing_jinja.html file. Another thing which needs to be fixed is the "Choose old billing date" select options under "Start date". This is the resulting cumulative patch.
Oops, all reports related to TimingAndEstimationPlugin fail. This may be fixed modifying
./timingandestimationplugin/reports.py
all rows containingdescription AS _description_
need to prependt.
so update rows:to be seen as:
And again, please, note that this is a quick&dirty turnaround, not THE solution.