Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rules]

Use it for questions about the engine which allows site administrators to automate actions: the Rules module.

0
votes
1answer
542 views

How to perform some Rules Actions WHILE some condition is TRUE?

Using Rules, how can you perform a set of Rules Actions WHILE (some condition = TRUE)? About that condition: I'm not talking here about a Rules Condition ... Instead I mean some sort of boolean ...
1
vote
2answers
175 views

Using Workbench Moderation state changes in Drupal 8 as events in Rules

I would like to use Rules to send out emails to specific roles whenever a Moderation State change event occurs on a Node. So if a node is saved and and it goes from Draft -> Needs Review moderation ...
1
vote
2answers
20 views

How can I trigger a rule when there's no more scheduled content?

I have a Drupal 7 blog where I write content in advance and publish it using the Scheduler module. I'd like to be able to write a rule to send me an email when the site has published the last ...
0
votes
1answer
70 views

How duplicate order automatically with commerce 2

How do I automatically duplicate an order? I use Drupal 8 and Drupal Commerce 2. I need to duplicate some orders, each week, automatically. Orders have a Boolean field (recurrent_order). When the ...
0
votes
0answers
200 views

Webform Rule to Change Component Value

Does anyone know a way to change the value of a webform component after the submission is updated using rules? For example: Rule Triggers on Event: Webform Submission is Updated Action: Change ...
1
vote
2answers
41 views

Different roles create different amounts of a specific content type

I'm building a job directory where users are allowed to register (selecting a membership type) and create Companies and Jobs. A membership can be Simple, Business or Premium. The membership type is ...
1
vote
0answers
166 views

Rule to Change Webform Submission to Draft [closed]

I'm looking for a way with Rules (or otherwise I just figured that Rules would be the easiest without writing custom modules), to change the submission status of a webform from Submitted, to Draft. ...
0
votes
1answer
99 views

How to use Ubercart product SKU as a condition in Rules?

I need to display a message on the cart page if one or more specific SKUs are added to the cart. For example, if a product with SKU # ABC123 is added to the cart, the Rule should be triggered and ...
1
vote
0answers
29 views

How to programmatically check whether field on form has changed in hook_form_alter

In rules you have the ability to check whether a field in a form has been changed by negating node-unchanged:field-xyz = 123. I want to check whether a field has changed programmatically with the $...
1
vote
3answers
161 views

How to implement a button with different redirections?

I'm setting up a job directory using Drupal 8, together with a team. It is possible to see it here. As you can see below, in a screenshot of the site, there's a button called "Add new job": In a ...
1
vote
1answer
50 views

How to create a group page when creating a new group?

When I create a new group (using the Organic groups module), I want to use the Rules module to create a new group referenced page. I can create a new page using the Create new entity action, but I ...
3
votes
1answer
346 views

Data selectors for custom fields

I have two node types: Item and Order. I have an entity reference (field_items) set up on the Order content type which references Item (1 Order to N Items). The Item has a field (...
2
votes
2answers
45 views

How to grep Rules to search for a deprecated function?

I'm removing an obsolete custom module, but I want to make sure it isn't referenced in any rules. Is there a way for me to search / grep for a function name within all the rules on my site?
0
votes
1answer
43 views

How to identify which Rule is triggered?

I have a collection of email notifications created with Drupal Rules module and a separate custom database table with the ID's of the rules and emails to exclude from individual notifications. I need ...
-1
votes
1answer
31 views

How to alter a Rules Core Condition?

I need to use the core condition 'Entity has field' but without the selection list restriction. Easiest way to implement this is to wipe out the two restrictions manually. But how do I do this in a ...
0
votes
1answer
171 views

Unpublish node based on date field with Rules

I'm trying to unpublish a node based on a date field with Rules. I've followed this tutorial but somehow it doesn't seem to work. Here's my Component: { "rules_unpublish_termin" : { "LABEL" : "...
1
vote
1answer
32 views

How to display a Rules Link only if access to display the linked content was granted?

I'm using the Drupal Commerce 7.x, Rules Link, and Content Access modules. In my site Classified ads can be created, and then people can use credits (via User points) to pay for unlocking "contact ...
1
vote
2answers
43 views

How to create a rule which after several updates in 5 minutes of a node sends 1 message?

When a node is being updated I have a trigger for this in the rules engine. I want a notification of this in the email. The node is however updated several times in 5 minutes. I only need 1 ...
0
votes
1answer
17 views

Is it possible to create a rule on the event “after saving an existing block”?

The reason of such a rule would be that there is just one block a certain user can edit. And when he does so, after saving he is redirected to the blocks management page, which he has not the ...
3
votes
1answer
506 views

How to include IP address Token with Rules?

I would like to track IP address and User Agent when Rules sends out a email. How can I include the [current-user:ip-address] token and %server[HTTP_USER_AGENT] in „Send email“ rule? Unfortunately ...
1
vote
1answer
198 views

How to access node properties of another node using the Rules Link module?

I wonder how to access node properties via another node with Rules. I already store the link of my other node in a field (of the original node), but I don't know if we can do that. I'm using the ...
-1
votes
1answer
29 views

Access to the url of a node from another one

I'm a bit stuck there ! here what i do : I have two content types : Ad Lock, Ad complete. When a user create a node Ad Lock, i use rules to clone it and then convert the original in Ad complete. So ...
2
votes
1answer
60 views

Creating a Rule for email recipients

I am working on a site that has a registration form (created with Webform) for 4 different conferences. The registration goes to everyone on the list (there are 8 people on the email list). But we ...
1
vote
1answer
448 views

How to custom field has a value with the Rules module?

I'm using the "Entity is of type" condition for the After updating content event, the rule only fire when the field has a value of that updated/created node. The field, which is part of a custom ...
0
votes
1answer
30 views

Rules (not) triggered with Bulk Media Upload

Rules (not) triggered with Bulk Media Upload I have a node type called 'uploads' that includes a user reference field to make each upload particular/available to a certain user. I have added a rule ...
2
votes
1answer
58 views

Drupal 8 Rules and Media

I want to publish Media associated with content when the content is published. Is that possible with rules? If so, what are the conditions I need to set? The conditions I have set are: Node ...
1
vote
1answer
2k views

How to create a rule to send an email when someone creates content of selected type(s)?

I'm trying to create a rule (using the Rules module 8.x-3.x-dev) to send an email when someone creates content that is of the type Announcement or Article, but I can't seem to get the event to trigger ...
1
vote
1answer
265 views

Using Rules to send an email to all Simplenews subscribers

On a Drupal 8 site I'm working on, we are using Simplenews to allow users to subscribe to a mailing list for blog posts. The client would like us to set up a rule to automatically send an email to ...
0
votes
1answer
27 views

Allow content builder to 'disable' a content type form

I have a site that allows users to submit a 3d print job to a lab. The role of the site builder is: technician The content type in question is: print job Users can submit a print job (i.e. create a ...
2
votes
2answers
89 views

Is there a way to see what fields are used in Rules?

There is an field list overview in the reports for Views that shows the fields used. Here is a sample of it: Is there a quick way to find out which fields are used with Rules? It would be enough to ...
2
votes
2answers
81 views

How to send an email using Rules to everyone in an Organic Group based upon a date field?

I have an OG content type with a date field. When the date in the field comes up, I want to use Rules to send an email to everyone in the group using the other fields (title/body/og name) in the node. ...
1
vote
1answer
144 views

How to add a notification when a relation or friends publish new content?

I want like Facebook notification add icon when a user relationships or flag friends ( User Relationships or Flag Friend module) published some new content. I followed this good tutorial who is the ...
1
vote
0answers
93 views

How do I create a ruleset component?

I would like to create a custom ruleset component like the one described in How to automatically generate multiple aliases for one node? That answer is for Drupal 7, and I am using Drupal 8. When I ...
2
votes
3answers
181 views

How to use cron to delete nodes of a content type that does not allow deletion by anonymous users

The background for this question is here: Delete nodes using Rules and VBO Summary: a VBO View selects various nodes of a particular content type. A Rules Action Set is instructed to load this VBO ...
1
vote
1answer
207 views

Delete nodes using Rules and VBO

Rues and VBO are not working as expected to delete nodes. Can someone tell me what I'm missing? Thank you. What I have: A View with VBO field which successfully selects all nodes of a certain type ...
1
vote
1answer
53 views

How to send a Group email based on date field using Rules?

I'm using the Group module and I have a Group content type called Events with a date field. I am having trouble figuring out how use Rules to send an Email on the same day as the date field to all the ...
0
votes
1answer
39 views

How to transmit parameters to Rules Component upon using Rules Scheduler programmatically?

Now I'm trying to create a Rules Scheduler task programmatically. I've created a Rules Action with parameters and callback, also I've created a Rules Component with this Rules Action. But upon ...
0
votes
1answer
172 views

Is there a way to create a Rules component programmatically?

Is there a way to programmatically create a Rules component? I mean a component like the ones listed on /admin/config/workflow/rules/components.
2
votes
1answer
182 views

Notification of new comments for author and comment writers

I'm trying to implement a rule (in D7) that will automatically (no check box or opting out): send an email to the author of node if new comments send email to all users who have commented on that ...
0
votes
1answer
43 views

Rule + redirect

I want all my anonymous users to be redirected to a specific page. I created a rule for this : https://imgur.com/mUl8H9Q It works, all anonymous are redirected to the page "espace press" and they can ...
0
votes
0answers
48 views

How to create a postponed action programmatically?

There's a task. When user is registered he's assigned an advanced role, but in three month this role should be taken away. Could you clarify me, is it possible to create this action programmatically ...
0
votes
1answer
24 views

How to display items in Rules data selector in alphabetical order

Because of my sites having a lot of fields, it takes me a lot of time to select fields in the Rules data selector, because they are sorted by date created. What should I do to make them sorted ...
1
vote
1answer
229 views

How to create a rule to perform a redirect if user is already logged in and visits the homepage?

I have a Drupal 7 installation. In my homepage I have only two forms (login and register) so I need when someone leaves the site and the user is logged in, when he visits it again that he redirect to ...
0
votes
1answer
123 views

How to create a membership using rules, using membership entity module

I'm using the membership entity module, and the membership entity commerce module. I am trying to create a membership using rules, without success yet. There is one membership action available..to ...
0
votes
1answer
332 views

How to show authorized users a link for relevant Views results using the Rules Link module?

Assume a list of entities, created by the Views module. For example a list of "All blocked/active users" which looks like so: User name Active Created date Last login Hillary.Trump No ...
1
vote
2answers
46 views

Rules component works different when fired by cron

I have a Rules Component that I want to run every week, using cron. The component's elements: set a variable (emailbodytext) viewsloop 1 to fill the emailbodytext with titles of all recent nodes ...
1
vote
3answers
131 views

How do I add “Update Status of User” action to a view?

I want to create a user list with the Views module, to change the user status. I use the Views Bulk Operations module, but it has no Change status or Active user action. How can I enable (or change ...
2
votes
0answers
156 views

The context for node is NULL, but the context node in rules_node_is_of_type requires a value [closed]

I am working on Drupal 8 project I have made a content type by name glossary having machine name glossary Also, I have made one field in it, i.e. description having machine name field_description. As ...
1
vote
1answer
56 views

How do I create a tax calculation rule that runs by default before the customers address has been set?

With Drupal Commerce and the Australian GST calculation module, I have been trying to calculate taxes as early as possible. Most of the customers to the site are Australian and will have to pay the ...
1
vote
1answer
61 views

How to create a node and populate its fields with info from a completed goal?

I need to create a node and populate its fields with data from a completed Goal (implemented via the Goals module) using Rules. The completed Goal info is fetched using the method from the question ...