Modify ↓
Opened 15 years ago
Closed 8 years ago
#8772 closed defect (wontfix)
Trying to create pie graph of tickets that have been created within the last month
| Reported by: | Owned by: | aviram | |
|---|---|---|---|
| Priority: | normal | Component: | TicketChartsMacro |
| Severity: | normal | Keywords: | query |
| Cc: | Trac Release: | 0.11 |
Description
I have tried both
TicketChart(type = pie, factor = status, query=time="04/05/11..05/05/11", height=600, width=800)?
TicketChart(type = pie, factor = status, query=time="04/05/11".."05/05/11", height=600, width=800)?
and I see the error
Error: Macro TicketChart(type = pie, factor = status, query=time="04/05/11..05/05/11", height=600, width=800) failed 'NoneType' object has no attribute 'tz'
I can create a report using the same query
Here is the output from the log file
2011-05-06 09:33:14,618 Trac[formatter] ERROR: Macro TicketChart(type = pie, factor = owner, query=time="04/05/11".."05/05/11", height=600, width=800) failed:
Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 710, in _macro_formatter
return macro.process(args, in_paragraph=True)
File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 304, in process
text = self.processor(text)
File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 291, in _macro_processor
text)
File "/var/trac/astrobear/plugins/TicketCharts.py", line 460, in expand_macro
return create_graph(formatter.req, formatter.env, args)
File "/var/trac/astrobear/plugins/TicketCharts.py", line 404, in create_graph
chart, chart_div_id, additional_html = chart_creation[args['type']](env, db, args)
File "/var/trac/astrobear/plugins/TicketCharts.py", line 391, in pie_graph
return _pie_graph(env, db, args['factor'], query = args.get('query'), title = args.get('title'))
File "/var/trac/astrobear/plugins/TicketCharts.py", line 366, in _pie_graph
ticket_stats = _get_pie_graph_stats(env, db, factor, query)
File "/var/trac/astrobear/plugins/TicketCharts.py", line 326, in _get_pie_graph_stats
sql = _get_query_sql(env, query, required_columns = [factor, ])
File "/var/trac/astrobear/plugins/TicketCharts.py", line 180, in _get_query_sql
sql_format_string, format_string_arguments = query_object.get_sql()
File "build/bdist.linux-x86_64/egg/trac/ticket/query.py", line 606, in get_sql
clauses = filter(None, (get_clause_sql(c) for c in self.constraints))
File "build/bdist.linux-x86_64/egg/trac/ticket/query.py", line 606, in <genexpr>
clauses = filter(None, (get_clause_sql(c) for c in self.constraints))
File "build/bdist.linux-x86_64/egg/trac/ticket/query.py", line 590, in get_clause_sql
for val in v]
File "build/bdist.linux-x86_64/egg/trac/ticket/query.py", line 491, in get_constraint_sql
start = get_timestamp(start)
File "build/bdist.linux-x86_64/egg/trac/ticket/query.py", line 472, in get_timestamp
return to_utimestamp(parse_date(date, req.tz))
AttributeError: 'NoneType' object has no attribute 'tz'
Attachments (0)
Note: See
TracTickets for help on using
tickets.



I should also mention that just looking for tickets for one day (ie query=time="05/05/11") produces the same behavior