A patch is attached which allows more fine-grained control over executing actions when the "User was awarded points" trigger is fired. In the current release you can only restrict actions based on how many userpoints the user has after the transaction has been processed. The patch adds the following conditions:

  • Check the Userpoints transaction category
  • Compare Userpoints before the transaction
  • Compare the transaction amount

The existing Userpoints condition of "Userpoints amount >= x" has also been renamed "Compare current Userpoints" for consistency.

After applying the patch you can now configure rules along the lines of:

IF the transaction category is "Specific category"
AND the transaction amount is > 500
AND the userpoints before the transaction were < 5000
AND the userpoints after the transaction are >= 5000
DO show a message to the user

CommentFileSizeAuthor
userpoints_rules.patch6.68 KBlongwave

Comments

kbahey’s picture

Status: Active » Fixed

Committed. Thank you.

Should be available in the tar ball about 11 hours from now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

chertzog’s picture

Component: Code: userpoints_rules/userpoints_workflow_ng » Code: userpoints
Status: Closed (fixed) » Active

could you port this to D7?

berdir’s picture

Component: Code: userpoints » Code: userpoints_rules
Status: Active » Closed (fixed)

Not necessary. You should have access to all properties of a userpoints transaction and you can build whatever conditions you want using the default data comparison conditions.

jschouppe’s picture

Hello,

Do you have this patch available for the 7.x version?

Kind regards,

Jürgen