Modify

Opened 11 years ago

Closed 11 years ago

#11275 closed defect (fixed)

TracHoursRoadmapFilter is not working on BitNami Trac Stack

Reported by: Jader Meros Owned by: Ryan J Ollos
Priority: normal Component: TracHoursPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description (last modified by Ryan J Ollos)

After installing TracHoursPlugin on my BitNami Trac Stack server all functionality from trachours plugin is available except for TracHoursRoadmapFilter (although enabled on the plugins page).

Package Version

  • Trac 1.0
  • Babel 0.9.6
  • Docutils 0.5
  • Genshi 0.6 (without speedups)
  • mod_wsgi 3.3 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
  • Pygments 1.4
  • pysqlite 2.6.3
  • Python 2.7.3 (default, Sep 3 2012, 09:11:12) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-56)]
  • setuptools 0.6c11
  • SQLite 3.7.10
  • Subversion 1.7.5 (r1336830)
  • jQuery 1.7.2

Installed Plugins

When accessing the roadmap or a specific milestone page, no information regarding the estimated and total hours is displayed. Looking on the Trac logs no error or warning messages are displayed. The only entries about TracHours are:

2013-08-09 14:09:07,233 Trac[loader] DEBUG: Loading trachours.multiproject from /opt/bitnami/apps/trac/trac_projects/Project/plugins/TracHoursPlugin-0.6.0dev-py2.7.egg
2013-08-09 14:09:07,234 Trac[loader] DEBUG: Loading trachours.setup from /opt/bitnami/apps/trac/trac_projects/Project/plugins/TracHoursPlugin-0.6.0dev-py2.7.egg
2013-08-09 14:09:07,234 Trac[loader] DEBUG: Loading trachours.ticket from /opt/bitnami/apps/trac/trac_projects/Project/plugins/TracHoursPlugin-0.6.0dev-py2.7.egg
2013-08-09 14:09:07,235 Trac[loader] DEBUG: Loading trachours.trachours from /opt/bitnami/apps/trac/trac_projects/Project/plugins/TracHoursPlugin-0.6.0dev-py2.7.egg
2013-08-09 14:09:07,235 Trac[loader] DEBUG: Loading trachours.web_ui from /opt/bitnami/apps/trac/trac_projects/Project/plugins/TracHoursPlugin-0.6.0dev-py2.7.egg

Attachments (0)

Change History (5)

comment:1 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 11 years ago by Ryan J Ollos

Most likely the XPath expressions need to be adjusted to account for changes in roadmap.html and milestone_view.html in Trac 1.0. The estimated and total hours are added in the ITemplateStreamFilter implementation.

comment:3 in reply to:  2 Changed 11 years ago by Jader Meros

Replying to rjollos:

Most likely the XPath expressions need to be adjusted to account for changes in roadmap.html and milestone_view.html in Trac 1.0. The estimated and total hours are added in the ITemplateStreamFilter implementation.

I took a look on the ITemplateStreamFilter implementation and found where the issue was. Below the diff from web_ui.py with the change I made to make it work again. Please feel free to use it to fix the bug and close the ticket.

65c65
<                 xpath = "//div[@class='milestone']//div[@class='info']"
---
>                 xpath = "//div[@class='milestone']//div[@class='info trac-progress']"
68,69c68,69
<                 find_xpath = "//li[@class='milestone']//h2/a"
<                 xpath = "//li[@class='milestone']//div[@class='info']"
---
>                 find_xpath = "//div[@class='milestone']//h2/a"
>                 xpath = "//div[@class='milestone']//div[@class='info trac-progress']"
130,131c130
<                 items.append(tag.dt("Estimated Hours:"))
<                 items.append(tag.dd(str(estimated_hours)))
---
>                 items.append(tag.span("Estimated Hours: ", str(estimated_hours), class_="first interval"))
137,139c136,137
<             items.append(tag.dt(tag.a("Total Hours:", href=link)))
<             items.append(tag.dd(tag.a(hours_format % total_hours, href=link)))
<             return iter(tag.dl(*items))
---
>             items.append(tag.span(tag.a("Total Hours: ", hours_format % total_hours, href=link), class_="interval"))
>             return iter(tag.p(*items, class_="legend"))
Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:4 Changed 11 years ago by Ryan J Ollos

Thanks, I will review and apply your patch.

comment:5 Changed 11 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 13396:

Estimated and total hours were not displaying on the roadmap and milestones in Trac 1.0 and later. Fixes #11275.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.