Modify

Opened 18 months ago

Closed 6 months ago

#10955 closed defect (duplicate)

Error using advanced query expressions

Reported by: regis.patroix@… Owned by: hoessler
Priority: high Component: EstimationToolsPlugin
Severity: critical Keywords:
Cc: regis.patroix@… Trac Release: 0.12

Description

When using the following operator, (because we have components with the same pattern in the name) : "~=", (the field content contains one or more of the values), in the query, this error occurs :

Error: Macro BurndownChart(milestone=Amadeus 2.1, priority!=minor, component~=Factory_std, title=factory without minor, startdate=2013-01-21, weekends=false, expected=144, gridlines=50, width=400, height=300, color=00009a, colorexpected=91e88a, bgcolor=e7f8ff) failed

a float is required

Using the "=" operator, (the field content exactly matches the one of the values), there is not error but the chart is wrong.

Here the full log :

2013-03-19 15:02:31,799 Trac[formatter] ERROR: Macro BurndownChart(milestone=Amadeus 2.1, priority!=minor , component~=Factory_std, title=factory without minor, startdate=2013-01-21, weekends=false, expected=144, gridlines=50, width=400, height=300, color=00009a, colorexpected=91e88a, bgcolor=e7f8ff) failed: 
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/wiki/formatter.py", line 717, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "/usr/lib/python2.7/dist-packages/trac/wiki/formatter.py", line 304, in process
    text = self.processor(text)
  File "/usr/lib/python2.7/dist-packages/trac/wiki/formatter.py", line 291, in _macro_processor
    text)
  File "/usr/local/lib/python2.7/dist-packages/EstimationTools-0.4.5-py2.7.egg/estimationtools/burndownchart.py", line 67, in expand_macro
    timetable = self._calculate_timetable(options, query_args, req)
  File "/usr/local/lib/python2.7/dist-packages/EstimationTools-0.4.5-py2.7.egg/estimationtools/burndownchart.py", line 158, in _calculate_timetable
    tickets = execute_query(self.env, req, query_args)
  File "/usr/local/lib/python2.7/dist-packages/EstimationTools-0.4.5-py2.7.egg/estimationtools/utils.py", line 141, in execute_query
    tickets = query.execute(req)
  File "/usr/lib/python2.7/dist-packages/trac/ticket/query.py", line 298, in execute
    self.num_items = self._count(sql, args, db)
  File "/usr/lib/python2.7/dist-packages/trac/ticket/query.py", line 279, in _count
    cursor.execute(count_sql, args)
  File "/usr/lib/python2.7/dist-packages/trac/db/util.py", line 65, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.7/dist-packages/trac/db/sqlite_backend.py", line 78, in execute
    result = PyFormatCursor.execute(self, *args)
  File "/usr/lib/python2.7/dist-packages/trac/db/sqlite_backend.py", line 54, in execute
    sql = sql % (('?',) * len(args))
TypeError: a float is required

Attachments (0)

Change History (2)

comment:1 Changed 6 months ago by anonymous

This ticket seems to be a duplicate of #11126

comment:2 Changed 6 months ago by rjollos

  • Resolution set to duplicate
  • Status changed from new to closed

Closing as a duplicate since #11126 has a patch.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.