mtierltd / timetracker

GNU Affero General Public License v3.0
82 stars 27 forks source link

No aggregation of column Details in Reports #165

Open imhanner opened 2 years ago

imhanner commented 2 years ago

Why aren't we aggregate column Details like columns Name or Project in Reports?

Currently

https://github.com/mtierltd/timetracker/blob/master/lib/Db/ReportItemMapper.php#L52

$selectFields[] = '\'*\' as "details"';

Suggestion

Couldn't we do the following?

$selectFields[] = 'string_agg(distinct wi.details, \',\') as "details"';
tonymurray commented 2 years ago

Thanks imhanner for the pointer, I edited my local version ReportItemMapper.php, changing the 'Currently' line above to:

$selectFields[] = 'wi.details as "details"';

and I added CSS rule using the "Custom CSS" App/plugin:

report .tabulator-cell {

white-space: normal; text-overflow: initial; overflow: visible; }

... in order to see full item details and wrap the text in the reports. Not sure if this is what you wanted to achieve?

I also adjusted the value "> 40" to much larger in ReportItemMapper.php, so as to see longer titles in reports

This works temporarily for me - it would be useful if there could be reports settings/ options to achieve above. Like: 'Show full details'.