Opened 15 years ago
Closed 14 years ago
#5555 closed defect (fixed)
Setting the time period to 50 days makes the chart disappear without message.
Reported by: | Heiko Graeber | Owned by: | Joachim Hoessler |
---|---|---|---|
Priority: | normal | Component: | EstimationToolsPlugin |
Severity: | normal | Keywords: | 7lima |
Cc: | Trac Release: | 0.11 |
Description
The BurndownChart
macro is very useful to show the project's progress
unless you need it for a longer period of time
which is common in the projects I work for.
One example for this is the following invocation:
[[BurndownChart(milestone=Release4.8, startdate=2009-06-10, enddate=2009-07-31)]]
which produces just an empty image tagged "Burndown". The macro might process a longer period of time or at least show a warning message to the user so [s]he might figure out how to use the macro in a way that works. Alternatively, this could be documented in the Wiki if it is not possible to fix the limitation.
I observed this using a Trac 0.10.4 installation.
Attachments (0)
Change History (5)
comment:1 Changed 15 years ago by
comment:2 Changed 14 years ago by
#8686 closed as duplicate.
For server-side charts we can actually switch to 'POST'
quite easily, so this patch should increase the limit from 2K to 16K (according to http://code.google.com/intl/no/apis/chart/faq.html#url_length):
-
estimationtools/utils.py
diff --git a/estimationtools/utils.py b/estimationtools/utils.py
a b 64 64 return req.path_info == '/estimationtools/chart' 65 65 def process_request(self, req): 66 66 req.perm.require('TICKET_VIEW') 67 url = 'http://chart.apis.google.com/chart?%s' % req.args.get('data', '') 68 self.log.debug("Fetching chart using url: %s" % repr(url)) 69 chart = urllib2.urlopen(url.encode('utf-8')) 67 data = req.args.get('data', '') 68 opener = urllib2.build_opener(urllib2.HTTPHandler()) 69 chart_req = urllib2.Request('http://chart.apis.google.com/chart', data=data) 70 self.log.debug("Fetch chart, %r + data: %r" % (chart_req.get_method(), data)) 71 chart = opener.open(chart_req) 70 72 for header, value in chart.headers.items(): 71 73 req.send_header(header, value) 72 74 req.write(chart.read())
comment:3 Changed 14 years ago by
Yessssssss! Your patch works well. Event that error logging mentioned in duplicate ticket #8686 is away now. Great work, mate! :-) This ticket can be closed now.
comment:4 Changed 14 years ago by
(In [10048]) EstimationToolsPlugin: Slight rework of server-side charts, switching to using POST
requests to Google internally. References #5555.
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Trac Release: | 0.10 → 0.11 |
Right, committed the patch switching to POST
for server-side charts. Realistically this is the best that can be done for this, as we can't really redo the regular client-side requests based on <img/>
tags. That would be way too involved.
So, I'm closing this as 'fixed'. Enable serverside_chart
setting to overcome the 'HTTPError: HTTP Error 414: Request-URI Too Large'
limitation.
This is most likely to do with limit of google charts URL size. If you check url used by empty image and bring it up in a brower you will see the google chart error message if it is this.