Modify

Opened 15 years ago

Closed 13 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 14 years ago by anonymous

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.

comment:2 Changed 13 years ago by osimons

#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  
    6464        return req.path_info == '/estimationtools/chart'
    6565    def process_request(self, req):
    6666        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)
    7072        for header, value in chart.headers.items():
    7173            req.send_header(header, value)
    7274        req.write(chart.read())

comment:3 Changed 13 years ago by falkb

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 13 years ago by osimons

(In [10048]) EstimationToolsPlugin: Slight rework of server-side charts, switching to using POST requests to Google internally. References #5555.

comment:5 Changed 13 years ago by osimons

Resolution: fixed
Status: newclosed
Trac Release: 0.100.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.

Modify Ticket

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