The Rules module is a module that allows site administrators to define actions that are conditionally executed, either programmatically or in response to predetermined events.

learn more… | top users | synonyms

0
votes
0answers
9 views

Set (add) group role when organic group membership is updated?

I am trying to set a users group role anytime a new membership is updated, however it appears roles are not brought into scope for me to set data value nor "grant og role" All I want is Event: After ...
0
votes
0answers
5 views

trigger a action based on the presence of families of products using rules?

How would I trigger a action based on commerce_product_calculate_sell_price if families of products (or quantities of families of products) are present using rules? For exemple, if the cart contains ...
1
vote
2answers
51 views

How to use the Rules module to unset all flags (set x days ago) without using Rules Scheduler

This is a follow-up to my question "How to use the Rules module to unset all flags (set x days ago) when cron runs?". Case: users set flags on content using Flag module (flags are per user, not ...
0
votes
1answer
25 views

Rules event is not triggering

I've created a custom action to fire when the "checkout is complete" event occurs. The front end is a mobile application, where as the back end is Drupal. So I create an order using its API and update ...
1
vote
1answer
32 views

Set value on newly created node using Rules

This is what I have now: Content type 123 has a Entity Reference field referencing content type XYZ. If new content is created of type XYZ then Rules creates new content of type 123. So by creating 1 ...
1
vote
1answer
38 views

How to use the Rules module to unset all flags (set x days ago) when cron runs?

Case: users set flags on content using Flag module (flags are per user, not global). Requirement: after a period of time the system should automatically unset these flags using Rules module. The ...
1
vote
1answer
35 views

How do I create a custom rule action? [on hold]

I have drupal 8, and I want to create a custom rule action. I have created it in Drupal 7, and it's working fine. I have no idea how to do it in Drupal 8. Can you please explain which code should I ...
0
votes
1answer
15 views

CKEditor Link a content with rule as a hypelink with title and url to a custom field

I would like to add a hyperlink entry in a blog which points to a internal content URL with different content type which needs to be display for authenticated users. 1.) The hyperlink should show the ...
0
votes
1answer
21 views

Hide the display of a field conditionally

I have the following scenario: I have many users created from People->Add user I have a content type (named Project) with the following fields: --Leaders (Type: Entity Reference to Users) --...
1
vote
1answer
19 views

Using computed field value in Rules

It is possible to fetch a computed field value using Rules? I tried with a simple rule "set a data value" trying to copy a Computed field value to other field. I put a "has field" with the CF. Then ...
0
votes
2answers
31 views

Showing both original base price and calculated price (inc. taxes), when using two price fields and rules

Building a webshop for customer with Drupal 7 + commerce. I've defined two price fields for commerce product entity: 1) base price (excluding tax) that is wholesale price 2) retailer price (excluding ...
0
votes
2answers
21 views

Creating entity in Rules causes PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry

My application based on CRM-Core. I am using several rules which launch on the event "After saving a new crm core contact" and each has a crm_core_activity entity created as the rule's action. Is it ...
0
votes
2answers
27 views

Different ways of logging in a user without having them to type anything?

I'm on Drupal 8 and currently looking to replicate similar functionality like: https://www.drupal.org/project/urllogin -- They do not have a D8 version yet. I need to auto login a specific user ...
0
votes
1answer
37 views

Send e-mail when a field has a specific value

I use the Workbench moderation module for Articles workflow. I would like to send an e-mail when Workbench moderation field has the needs review value. I tried using the Rules module, but I don't ...
0
votes
2answers
57 views

is there is any way to include files?

I am writing PHP code in a rule, where I include another PHP file. include_once 'google-api-php-client/src/Google/autoload.php'; Where do I need to include files?
0
votes
1answer
17 views

Convert username to hyperlink in comment reply same as Stackexchange comment reply

Is there already built module or usable functionality which is somewhat similar to stackexchange reply comment, where when we add username with @ sign, it notifies user. However in my case I would ...
0
votes
0answers
26 views

Rule that references not current node

When a user visits the homepage of our site I'd like to display a message, but only display it if they haven't viewed a particular (other) node yet. I can't find any data selector in the Rules module ...
1
vote
1answer
27 views

How to check the value from data sheet during Feeds import?

I am trying to import some data by using feeds importer. I want to check if there is any information under "equivalent" Source in the sheet. If there is no value, just skip the import. If it has, ...
0
votes
2answers
54 views

do some action when order status is changed to complete

In drupal commerce I want the rules module to do some action when the order status changes to completed. In fact, after buying some product an order is added to order list. Then, what I need is that ...
0
votes
0answers
20 views

Cant add rule condition “node is flagged” for custom global flag in Rules

I have global flag and rule that adds this flag to nodes that have comments. I need to create a rule that restricts access for flagged nodes authors to node/edit from. For this I obviously need to ...
1
vote
2answers
50 views

Send email to users, except author comments

Hello! I have node with field [field_users] (entity reference) I create rule [after saving new comment] Actions: Loop for field: [comment:node:field-users] inside loop i create var [users:mail] ...
3
votes
1answer
47 views

Set a Date field with Rules?

I have a form that users can fill out and it creates a node, an event node to be shown in the community calendar of my website. I'm using Rules to create the new node when the "Webform: After a ...
1
vote
1answer
17 views

content access does not work after changing domain

after designing and developing a website I changed its domain. Now any of the permissions are not working. every thing is OK appearently but the functionality is not OK at all.(I mean all the ...
0
votes
0answers
10 views

Feeds imported nodes, how to strip tag attributes?

In the data source, the content was copied from MS Word, and many ms-word-only tag attributes were kept. Now I use Feeds and related modules to import these content and want to strip those ms-word-...
1
vote
0answers
29 views

Which button id triggered the form submission

My module hade a form and the form have 5 buttons: create, edit, save, etc.. also my module form use ajax to send the requests, and the function look like this: $form['dialogCreateButton'] = array( ...
0
votes
0answers
14 views

Trouble figuring out how compare value from unsaved node with list of values from view

Ok, I am trying to make my custom Drupal anti-duplicate rule. I want it to fire up before content is saved and compare the specific field of the node currently being saved against the list of fields ...
1
vote
2answers
24 views

How to process a multiple values field (comma separated) in a Rules Action?

I am using modules "SMS Framework",Clickatell for sending message and I have configured all the settings which was required. I have also created a rule where node (Article) be saved and send a message....
0
votes
0answers
26 views

How to create entities on another site using the Web Services Client module

I have installed the Web Services Client module, together with the Drupal Services module and Rules, in order to create, edit and delete entities on a remote Drupal site. The remote Drupal site has a ...
2
votes
1answer
24 views

How to integrate messaging into a custom module?

I'm working on a custom module to handle time off requests for an intranet site and I'd like to be able to have the module fire off email notifications to a configurable list of users -- specifically, ...
0
votes
1answer
28 views

Rule for sending email when order exceeds a defined weight

I set up some shipping tariffs (with module shipping weight tariff). But now i want to define a rule that sends an email to the shopowner in case the order total weight is over a certain weight. How ...
0
votes
1answer
31 views

Pass contrib module tokens to custom event in rules

I am creating a custom rules event using hook_rules_event_info. This custom event is extending the features of the Stripe Subscription contrib module. The custom rules event is working fine so far. ...
1
vote
0answers
31 views

How can I pass values to Rules?

I would like to pass values to Rules (eg an array of words) and then do some Rules magic with them (eg create new nodes if they dont exist already). I found one solution here How to reference ...
0
votes
0answers
20 views

How to set Fivestar value using rule?

I have a form that contains different set of fields that will be connected to different review type / content type. The values of the form will be copied to that specific review type using the rules ...
0
votes
1answer
26 views

Products - Add to cart

I need some advice. My client has a website with loads of products. Now the client want the ability to add products to a cart, and instead of buying, they want the products to be mailed. How can I ...
1
vote
0answers
30 views

Commerce stock rule creation

I'm trying to create a rule that will unpublish a product display only if it's a certain type of product once stock reaches zero. I can't seem to find any good recipes to do that. I don't know ...
1
vote
1answer
39 views

How to automatically delete all product displays when a product is deleted?

To automatically delete the product displays when a product is deleted, is a feature of the module Auto Product Display, but I don't need that module. Preferably using the Rules module, I would like ...
3
votes
1answer
56 views

How can I send an email to the previous comment author when a user places a new comment?

I want to get the Email address of last comment's author. Actually, I want to send email by creating a rule when new comment posted and this email will go to the user who commented on node before ...
2
votes
1answer
24 views

How do I get the fields of form attached with a content type as token?

I do not know is it possible or not. I have a content type for creating tickets. I have a form attached to content type which contains ticket state and ticket assignee fields as drop down. Now I want ...
0
votes
0answers
12 views

How to create one universal inline entity create form with a dropdown to select the entity bundle

In my project I need the users to very quickly create entities of different bundles, all of the same entity type. The idea is to have a universal entity create form exposed in a block or panel pane, ...
0
votes
0answers
14 views

How to set a component value with VBO?

I installed Webform 7-4.12, VBO 7.33, Webform Rules 7.16. I tried 4 hours to set a value of submission of a "Select options" component with these modules(esp. the rule action component) in the node/*/...
0
votes
1answer
45 views

Rule works but produced “err_empty_response” error when I want to edit it

So I have created a rule, that works, does what it should exactly do (so the syntax and configuration is okay), but after creating it and waiting a while, the rule becomes un-editable and the edit ...
0
votes
0answers
45 views

How do I redirect anonymous users to the login?

I'm using rules module with drupal 8 in order to redirect anonymous users to the login page after registration form submission, so I created a rule with react on event "After saving new user (...
1
vote
0answers
20 views

Displaying Token Field Labels From Fetched Entity In Rules HTML Email

I am sending a MIME HTML email using rules. Much of the information contained in the email comes from a fetched custom entity (custom ECK entity). Using the available replacement patterns, I can get ...
1
vote
0answers
15 views

Grabbing and Manipulating Endpoints/Referenced Entities in Rules

Using Rules, I am creating relations from a Lab Cage Content Type that has a field that is an entity reference list, where you can select a list of Mice entities. For instance, if the user selects 3 ...
1
vote
1answer
37 views

Drupal Commerce Stock Availability or Out of Stock

I am working on Drupal Commerce website. Using Commerce Stock I am able to manage the inventory but on product details page I want to print the following. Availability: In Stock or Availability: ...
1
vote
0answers
58 views

Send email notification with Rules

I'm using Drupal 8.1 with Rules 8.x-3.0-alpha1. I want to create a rule to send an email to the author of a node when a new comment is posted to this node. Problem is I didn't get the email address ...
1
vote
1answer
20 views

How to create a rule to remove a product by sku, or remove a product to the cart

I searched, and searched in many, many articles and and I have not found a solution. What I want to do is to create a rule to delete a product by sku? Or a rule to delete products. I show you my ...
1
vote
1answer
19 views

How to create a Privatemsg thread with multiple recipients in a Rules component?

I'd like to send private messages to a selected group of users. For this purpose I use a view with VBO and a Rules component action (utilizing the "Send message" action provided by Privatemsg) - as ...
0
votes
0answers
9 views

How to merge the fields of two entities using Rules

I created a rules set that checks if a view result set of entities of the same bundle has duplicate titles. It then flags the duplicate entities. In order to make sure that no entities with duplicate ...
0
votes
0answers
21 views

Add custom image watermark based on role and content type

I am adding small watermark logo to all images using ImageCache Actions There are 10 users that are publishers of their own galleries, and i want to protect their images (i know they can not be ...