Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label translation mismatch #136

Open
samuelsov opened this issue Jul 2, 2021 · 0 comments
Open

Label translation mismatch #136

samuelsov opened this issue Jul 2, 2021 · 0 comments

Comments

@samuelsov
Copy link

Data label don't match data. I suspect that it is only happening in translated instance.

In the example below, Contact ID is associated with a date field:
Screenshot 2021-07-02 at 18-28-47 Membership Pivot Report ‹ Groupe BIM du Québec — WordPress

For now, the workaround I've found is to use the field names instead of the label but of course not ideal.

diff --git a/CRM/PivotData/DataMembership.php b/CRM/PivotData/DataMembership.php
index e5ef564..fb0a4f2 100644
--- a/CRM/PivotData/DataMembership.php
+++ b/CRM/PivotData/DataMembership.php
@@ -131,6 +131,9 @@ class CRM_PivotData_DataMembership extends CRM_PivotData_AbstractData {
           }
           $result[$group . '.' . $key] = $value;
 
+          // [SV] quick hack to avoid problem with label being mixed up
+          $value['title'] = $value['name'];
+
           if (is_array($value)) {
             $result[$group . '.' . $key]['optionValues'] = $this->getOptionValues($value);
           }

I suspect there is a ksort somewhere that mess the matching between labels and data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant