Needs review
Project:
User Points
Version:
7.x-2.x-dev
Component:
Code: userpoints
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2012 at 21:57 UTC
Updated:
4 Jan 2013 at 21:59 UTC
Jump to comment: Most recent file
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 #