📊 feat(Analytics): enhance datasource#2554
Conversation
6711e27 to
affcbbe
Compare
|
Playwright tests are not relevant to this Analytics datasource |
5d57359 to
ec1a744
Compare
Signed-off-by: Rello <github@scherello.de>
Signed-off-by: Rello <github@scherello.de>
ec1a744 to
21ce9c5
Compare
| if ($value === '') { | ||
| $value = $this->formatDefaultValue($column); |
There was a problem hiding this comment.
why switch from number to every type? So a cell that's legitimately empty on a column that has a default (text/selection/usergroup) will now render the default instead of blank? Is that the intendion for these types, or should the default only fill truly-missing cells rather than empty-string values?
There was a problem hiding this comment.
Hello,
good question. Can a cell value be completely missing?
Aim is e.g. a count-column for row counts. make it default=1 but the user does not need to fill the column. is this empty or ''?
| $value = (string)$value; | ||
| if ($column->getSubtype() === 'link') { | ||
| return $this->formatLinkValue($value); | ||
| } |
There was a problem hiding this comment.
can we use the predefined constants instead of hardcoding e.g SUBTYPE_TEXT_LINK
There was a problem hiding this comment.
thanks for the hint. makes sense. I will change it
There was a problem hiding this comment.
Hello,
I misunderstood this comment. I thought that these were types from the app already. This string is only used one time, so there is no reusable to put it in a constant for just this datasource
| } | ||
|
|
||
| private function isMultiSelection(Column $column): bool { | ||
| return in_array($column->getSubtype(), [Column::SUBTYPE_SELECTION_MULTI, 'multi'], true); |
There was a problem hiding this comment.
not sure we need the multi option
There was a problem hiding this comment.
it seems there was some usage so it looks like a legacy case
https://github.com/nextcloud/tables/blob/main/lib/Db/Row2Mapper.php#L477
Signed-off-by: Rello <Rello@users.noreply.github.com>

The datasource for the Analytics app is enhanced to provide more reporting capabilities:
countcolumn=1 is added for statistics in AnalyticsThe datasource now returns analytics-friendly scalar values for:
Unit test was added