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
| Comment | File | Size | Author |
|---|---|---|---|
| userpoints_rules.patch | 6.68 KB | longwave |
Comments
Comment #1
kbahey commentedCommitted. Thank you.
Should be available in the tar ball about 11 hours from now.
Comment #3
chertzogcould you port this to D7?
Comment #4
berdirNot 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.
Comment #5
jschouppe commentedHello,
Do you have this patch available for the 7.x version?
Kind regards,
Jürgen