Userpoints 7.x-1.x is on a good way to get a first rc soon enough and hopefully quickly after that also a stable release. Apart from a few issues, we had an extremely low number of bug reports and there are no bug reports open right now. So it seems to work nicely.

For 7.x-1.x, we have focused on stability and improve user interfaces. There were also a few API extensions and a lot of refactoring but for the most part is the API exactly like it was in D6.

I had various ideas already for the 7.x-2.x branch, some of them discussed with BenK and others today with miro_dietiker. I've wanted think these through for quite some time now and get them on paper (well, something like that...). So that issue is a start for that.

The big picture:
There will be a single entity called userpoints_transaction. It will be possible to create multiple bundles (think: node types or user relationship types), each of them will have customizable settings attached like Branding (similar to what we are doing with UR now). This will replace the current categorization feature.

Then, it will be possible to attach each of those bundles to any other entity (users typically, but also nodes and so on). It would be both possible to use the same bundle on multiple entity types/bundles and use multiple userpoints fields on the same entity. These fields would actually only contain aggregated point amounts (current, max, others can be added by additional modules). I am not yet sure if that information will be stored directly in the field or in separate tables for performance reasons.

The current API's for writing and reading/searching the userpoints (both transactions and aggregations) will be redesigned using OOP (one idea is using fluent interfaces similar to db_select() etc.)

In the user interface, not much should change compared to what we have now. One main difference is making single transactions read-only as soon as they were approved/declined but provide ways to easily hide and revert them through new transactions. That should help to simplify the code quite a bit and make it more reliable.

Issues:
- #1258016: Use entity system for userpoints transactions
- - #1258018: Make userpoints_transaction entity fieldable
- - #1258026: Implement userpoint bundles
- - #1258032: Allow to attach a points field to any entity and migrate the current hardcoded assignement to users
- - #1258040: Update hooks according to D7 best practices (no $op, $transaction instead of params)
- - #1870674: Categorization with default taxonomy term reference field and views
- #1258042: Revamp userpoints_userpointsapi() using an OOP approach similar to SelectQuery
- #1258046: Provide a querying system for userpoints transactions (and totals)
- #1258050: Making transactions read-only after approved/declined + Make it easy to create reverting/adjusting transactions
- #1258052: Provide an easy to extend aggregation API
- #1165256: Allow points with decimal places
- #1258058: Replace listings (at least administrative ones) with views and just provide default views

(Might not be complete yet)

Comments

BenK’s picture

Subscribing

hubrt’s picture

+1

liupascal’s picture

I have a module in my sandbox for stock management purpose (Drupal Commerce) http://drupal.org/sandbox/liupascal/1186926 - it uses a transaction system to handle all the in and out stock variations (basically create a stock entry with positive or negative value, which will impact a commerce product stock field) - Maybe there some code you can re-use

There will be a single entity called userpoints_transaction. It will be possible to create multiple bundles (think: node types or user relationship types), each of them will have customizable settings attached like Branding (similar to what we are doing with UR now). This will replace the current categorization feature.

Will you provide an "upgrade" path for this from 1-x to 2-x ?

Thanks

berdir’s picture

I am not yet sure how the upgrade path will look like. But there will be one.

berdir’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
berdir’s picture

Issue summary: View changes

Added issues

Taxoman’s picture

Title: Roadmap to 7.x-2.x » Userpoints Roadmap to 7.x-2.x
MacRonin’s picture

Since you mention tying different records together, I though I'd mention the Relation module. It may help with all the interconnecting relationships.

http://drupal.org/project/relation

Adding two more in case they can help also

===

Provides a field type that can reference arbitrary entities:

A generic entity reference field
Four widgets:
Two implemented on top of the List module (Select and Radios/Checkboxes),
Two autocomplete widgets (one with one text field per entry, one tag-style with comma-separated entries in the same text field)

Two formatters:
A "Label" formatter, with optional link that displays the label of the referenced entity (the node title, the user name, etc.)
A "Rendered entity" formatter, that renders the references entity using a configurable view mode

Integration with Views (for both forward and backward references)
Integration with Entity Metadata (and as a consequence with Search API and the like)
Integration with Devel generate:

http://drupal.org/project/entityreference

===

For Site Builders

User Interface for managing entity types, bundles, and entities
Dynamically add or delete properties from any entity type built with ECK
Add functionality offered by ECK or other modules to any of your properties through the new behavior system (new in 7.x-2.x)

For Developers

Class to create an manipulate entity types with ease
the paths of the different components of an entities administration (add, edit, delete, view) are all handle through the entity info array, so they can be easily changed through an alter hook, and the administration will keep its integrity
ECK introduces a plugin type called property behavior to develop flexible functionality for properties that can be attached to any property on any ECK entity type

http://drupal.org/project/eck

mradcliffe’s picture

I'm going to try to work on this for the next month.

berdir’s picture

Sounds great, I haven't had much time to work on this. Make sure to get in contact with me in IRC (I'm usually in #drupal-contribute when I'm online) when you start working on it.

berdir’s picture

Issue summary: View changes

Added another issue

mradcliffe’s picture

Issue summary: View changes

Add categorization issue branched from bundle issue.

socialnicheguru’s picture

if we were to try this today would it work with other userpoints modules like userpoints_contrib?

matslats’s picture

Also consider my Community Accounting module which already uses transactions as the fundamental accounting entity. User scores are deduced from adding their transactions, and multiple currencies are possible. this module can do everything userpoints can do, although it is more focused on the user-to-user payment experience than on setting up an elaborate system of autopayments.
http://drupal.org/project/mutual_credit

marty.true’s picture

Any word on the state of 7.x-2.x-dev? With Entities being king of D7 now, I would love to see UP work with entities as I saw in a patch from Berdir...

lias’s picture

Interested in 7x-2x version as well.

forestgardener’s picture

Subscribing

b3nji’s picture

Is this even being developed still? The last update to 7.x-2.x was back in Oct 2013 and we haven't heard anything since.

giuvax’s picture

What about integration with VBO? Or am I missing something, it's already in queue? Thank you