This commit is contained in:
Sara Arjona 2022-10-13 16:25:40 +02:00
commit 6eb67954f3
2 changed files with 23 additions and 1 deletions

View File

@ -138,6 +138,7 @@ class groupconcat extends base {
$formattedvalues[] = parent::format_value($originalvalue, $originalvalues, $callbacks, $columntype);
}
return implode(', ', $formattedvalues);
$listseparator = get_string('listsep', 'langconfig') . ' ';
return implode($listseparator, $formattedvalues);
}
}

View File

@ -117,6 +117,27 @@ Feature: Manage custom report columns aggregation
| Average | 0,7 |
| Percentage | 66,7% |
Scenario Outline: Aggregated columns display localised list separators
Given the following "language customisations" exist:
| component | stringid | value |
| core_langconfig | listsep | ; |
And the following "core_reportbuilder > Reports" exist:
| name | source | default |
| My report | core_user\reportbuilder\datasource\users | 0 |
And the following "core_reportbuilder > Columns" exist:
| report | uniqueidentifier |
| My report | user:lastname |
| My report | user:firstname |
And I am on the "My report" "reportbuilder > Editor" page logged in as "admin"
And I change window size to "large"
When I set the "First name" column aggregation to "<aggregation>"
Then I should see "Aggregated column 'First name'"
And I should see "<output>" in the "Richie" "table_row"
Examples:
| aggregation | output |
| Comma separated distinct values | Ben; Bill |
| Comma separated values | Ben; Bill; Bill |
Scenario: Show unique report rows
Given the following "core_reportbuilder > Reports" exist:
| name | source | default | uniquerows |