You are here

rules.reaction.userpoints_rules_earn_on_comment_post.yml in User Points 8

modules/rules_example/config/install/rules.reaction.userpoints_rules_earn_on_comment_post.yml

File

modules/rules_example/config/install/rules.reaction.userpoints_rules_earn_on_comment_post.yml
View source
  1. langcode: en
  2. status: true
  3. dependencies:
  4. config:
  5. - transaction.operation.userpoints_rules_earn_on_comment_post
  6. enforced:
  7. module:
  8. - userpoints_rules_example
  9. id: userpoints_rules_earn_on_comment_post
  10. label: 'Earn points for posting a comment'
  11. events:
  12. -
  13. event_name: 'rules_entity_insert:comment'
  14. description: 'Grant some points to comment authors.'
  15. tags:
  16. - userpoints
  17. - example
  18. config_version: '3'
  19. expression:
  20. id: rules_rule
  21. uuid: 21b7d737-b901-4fed-810c-8d9308fa52a7
  22. conditions:
  23. id: rules_and
  24. uuid: c4491c29-b503-4435-8f66-0ba018dcba78
  25. conditions: { }
  26. actions:
  27. id: rules_action_set
  28. uuid: 78b8c06b-60ac-4c28-83ca-35f101804eb2
  29. actions:
  30. -
  31. id: rules_action
  32. uuid: a83fd5e0-8837-4b7e-b075-3a611ab2d797
  33. context_values:
  34. transaction_type_id: userpoints_default_points
  35. operation_id: userpoints_rules_earn_on_comment_post
  36. transaction_field_amount: '5'
  37. transaction_field_balance: '0'
  38. transaction_field_log_message: ''
  39. context_mapping:
  40. target_entity: comment.uid.entity
  41. context_processors:
  42. transaction_type_id:
  43. rules_tokens: { }
  44. operation_id:
  45. rules_tokens: { }
  46. transaction_field_amount:
  47. rules_tokens: { }
  48. transaction_field_balance:
  49. rules_tokens: { }
  50. transaction_field_log_message:
  51. rules_tokens: { }
  52. provides_mapping: { }
  53. action_id: 'transaction_create:userpoints'
  54. -
  55. id: rules_action
  56. uuid: 5afc896f-b9eb-4674-899a-923cb6011b98
  57. context_values: { }
  58. context_mapping:
  59. data: transaction.field_userpoints_default_linkref
  60. value: comment
  61. context_processors: { }
  62. provides_mapping: { }
  63. action_id: rules_data_set
  64. -
  65. id: rules_action
  66. uuid: 465d180f-a7f2-4530-96ec-feca7d855549
  67. context_values:
  68. immediate: ''
  69. context_mapping:
  70. transaction: transaction
  71. context_processors:
  72. immediate:
  73. rules_tokens: { }
  74. provides_mapping: { }
  75. action_id: transaction_execute