backdrop-contrib / userpoints

API module for recording points for other modules.
GNU General Public License v2.0
1 stars 0 forks source link

What is the use of the "TRANSACTION TYPES" #4

Open sds-i opened 4 years ago

sds-i commented 4 years ago

What is the use of the extra tab in BackdropCMS calleds "TRANSACTION TYPES" under .../admin/config/people/userpoints/types. This is not available in D7 as far as I can see.
A hint to what the fields are for would be useful. Thanks

docwilmot commented 4 years ago

In Backdrop we chose a dependency on Entity UI which probably adds this as default. it doesnt seem to do anything. will need to check.

sds-i commented 4 years ago

Thanks, I managed to get some userpoints going - unfortunately that was a one off. I couldn't get this back and now I am getting this error message:

Debug: The variable or parameter _type_ is empty.
Debug: Unable to evaluate _action userpoints_action_grant_points_.

When I do a manual adding of points for a user the "TRANSACTION TYPES" has to be entered first of all. What is confusing that the "TRANSACTION TYPES" can have fields added, it's just not clear which field and for what purpose. A hint would be great to understand this well enough to put the right parameters/variables into the right place. The export from one of the rules that does not work looks like this:

{ "rules_points" : {
    "LABEL" : "Points",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "userpoints_rules" ],
    "ON" : { "node_insert--page" : { "bundle" : "page" } },
    "IF" : [
      { "node_is_of_type" : { "node" : [ "node" ], "type" : { "value" : { "page" : "page" } } } }
    ],
    "DO" : [
      { "userpoints_action_grant_points" : {
          "type" : "userpoints",
          "user" : [ "node:author" ],
          "points" : "27",
          "tid" : "0",
          "entity" : [ "node:author" ],
          "operation" : "added",
          "reference" : "[node:title]",
          "display" : "1",
          "moderate" : "approved"
        }
      }
    ]
  }
}

All hints and ideas are welcome, thanks