Modify

Opened 15 years ago

Closed 15 years ago

#5589 closed defect (fixed)

stacked_bar does not set query-values correctly

Reported by: markusl@… Owned by: aviram
Priority: high Component: TicketChartsMacro
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description

When clicking on parts of pie- and bar- charts all related tickets are shown.

In case of stacked_bars no tickets are filtered. For the 'x_axis' the filter is selected, but the 'key' is NOT selected. If I manuallay set the missing option and press 'Update' the correct tickets are listed.

Attachments (0)

Change History (3)

comment:1 Changed 15 years ago by aviram

Hey,

I hope I'll have time to check that out at the weekend. Are you sure that you have the latest version?

A previous version had a similar bug that was solved in #5326.

Aviram

comment:2 Changed 15 years ago by anonymous

Hello aviram,

thanks for the fast reply. Yes, I already use the latest version from svn

I'm talking about stacked-bars-charts, #5326 seem to solve this for pie-charts:

Source from http://trac-hacks.org/browser/ticketchartsmacro/0.11/TicketCharts.py

Please compare

180 	def _get_stacked_bar_chart_stats(env, db, key, x_axis, query):
181 	    sql = _get_query_sql(env, query)

and

313 	def _get_pie_graph_stats(env, db, factor, query = None):
...
323 	    sql = _get_query_sql(env, query, required_columns = [factor, ])

Stacked bars function does not contain this additional parameter "required_colums". Maybe this function needs to be extended, too?

Thanks!

comment:3 Changed 15 years ago by aviram

Resolution: fixed
Status: newclosed

Hey,

I haven't looked at it closely - just tried to create stacked bar charts with a field that normally doesn't get into queries, and I think you're right.

I have added the x_axis and key as required columns for stacked bars charts (this will fix bar charts as well, since the same code handles both).

The change [6381] does this.

I'm closing this one, if it still doesn't solve your problem, please reopen it.

Modify Ticket

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