Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is branched from #1258026: Implement userpoint bundles (#2).
The issue title & description is mainly a placeholder until things gel.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1870674-categorization-as-reference-2.patch | 21.96 KB | mradcliffe |
#2 | 1870674-interdiff-with-1258032-3-do-not-test.patch | 13.83 KB | mradcliffe |
#1 | issue-1870674-full-diff.patch | 10.82 KB | mradcliffe |
#1 | issue-1870674-interdiff-with-field-patch-do-not-test.patch | 2.59 KB | mradcliffe |
Comments
Comment #1
mradcliffeHere's a start to this by creating or using an existing a taxonomy term reference field from within userpoints_get_vid(). Not really tested.
Comment #2
mradcliffeI really didn't like the whole userpoints_get_vid() thing. It's kind of wonky. I think the following should be easier to create tests:
The first patch is a full diff with changes from all issues, and the second patch is a patch branched from #1258032: Allow to attach a points field to any entity and migrate the current hardcoded assignement to users.
Comment #3
Berdiruserpoints_get_vid() probably dates back to Drupal 5 or so, way before vocabularies had machine names. I totally agree that it's wonky, machine names should be used for that nowadays. But removing it completely and relying on a machine name instead will require an update function.
Comment #4
mradcliffeAny ideas about what to do with the userpoints_get_*_points functions? Can't use aggregation with a field table join without breaking no-SQL compatibility and can't do all of this in PHP/entity loads without running into scalability issues.
The only solution I can see is to mark this "won't fix" and have to live with tid as an entity property.
Comment #5
mradcliffeHere's a thought after some quick IRC:
Use cases
Comment #6
mradcliffeOkay, I think the summary from IRC is that
a) ignore this issue for now and look at providing agggreation tools instead of taxonomy terms in userpoints. #1258046: Provide a querying system for userpoints transactions (and totals), #1258052: Provide an easy to extend aggregation API.
b) bundle support on entity #1258026: Implement userpoint bundles
c) add bundle as a field setting to field, and do better field formatting #1258032: Allow to attach a points field to any entity and migrate the current hardcoded assignement to users
marked as needs review for summary review
Comment #6.0
mradcliffeWrong comment #