Opened 6 years ago

Closed 3 years ago

#173 closed Bug (fixed)

API responses sub tables should contain same metrics as parent tables (filters should be applied recursively)

Reported by: matt Owned by:
Priority: low Milestone: Piwik 1.2
Component: Core Keywords:
Cc: Sensitive: no

Description (last modified by matt)

For example we do:

	$dataTable = $this->getDataTable('Actions_outlink', $idSite, $period, $date, $expanded, $idSubtable );
		$dataTable->queueFilter('Piwik_DataTable_Filter_ColumnCallbackAddDetail', array('label', 'url', create_function('$url', 'return $url;')));
	

But we may want to apply the filter recursively if the returned data table has many levels (the case for actions when searching recursively for example).

I can see 2 implementations:

  • queueRecursiveFilter( Filter )
  • dataTable->setFiltersRecursive()

both are not incompatible. The first is better in my opinion.

Change History (6)

comment:1 Changed 6 years ago by matt (mattab)

  • Description modified (diff)
  • Milestone set to Future features

comment:2 Changed 5 years ago by matt (mattab)

  • Type changed from Bug to New feature

comment:3 Changed 5 years ago by koteiko

comment:4 Changed 4 years ago by matt (mattab)

  • Priority changed from major to low
  • Sensitive unset

comment:5 Changed 3 years ago by matt (mattab)

  • Milestone changed from Feature requests to 1.2 Piwik 1.2
  • Summary changed from Queued Filters should be possible to apply recursively to API responses sub tables should contain same metrics as parent tables (filters should be applied recursively)
  • Type changed from New feature to Bug

comment:6 Changed 3 years ago by matt (mattab)

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

(In [3764]) Fixes #173 - making all filters recursive by default (no performance impact since it won't load the tables if they were not loaded in the API). Updating all filters to reflect new abstract class signature

Note: See TracTickets for help on using tickets.