Problem/Motivation

A key problem with the API is that records in the userpoints table are not standalone records, they depend upon the previous revision record. This means that that individual userpoint records can't be removed or edited, instead a new revision has to be added that makes the change, but there's no connection on this new revision to the previous revision.

The expectation with a points system is that records would be created for each points addition, like a regular table:

Entity type Entity ID Type Created Points
User 5 Account created 2022-10-11 5:00am 100
User 5 Created comment #123 2022-10-11 5:01am 5
User 5 Created comment #124 2022-10-11 5:02am 5
User 5 Created comment #125 2022-10-11 5:03am 5
User 5 Created node #235 2022-10-11 5:10am 10
User 5 Liked node #222 2022-10-11 5:11am 1

Totals could be either saved in a separate column, or through a separate API.

Proposed resolution

Change the API so that:
* Each userpoints record is a standalone thing, i.e. its own entity.
* The running total for a given type of point for a given entity would be generated using an API.

Remaining tasks

Change the API.

User interface changes

TBD

API changes

Lots :-)

Data model changes

TBD

CommentFileSizeAuthor
#2 userpoints-n3314902.zip39.29 KBdamienmckenna

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

StatusFileSize
new39.29 KB

WIP alternative version of the module that stores uses separate userpoint records for each value instead of using revisions.

adriancid’s picture

@DamienMcKenna I think you should ask to become a maintainer of this module and use your zip file as a starting point of the D10 version.

damienmckenna’s picture

Unfortunately I don't use the module anymore.

pearls’s picture

I compared the zip folder(#2) and the current dev versions. There are significant differences. I hope a merge will be added soon.