Opened 8 years ago

Closed 8 years ago

stacked_bar does not set query-values correctly

Reported by: Owned by: markusl@… aviram high TicketChartsMacro critical 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.

comment:1 Changed 8 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 8 years ago by anonymous

Hello aviram,

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

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 8 years ago by aviram

Resolution: → fixed new → closed

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