Closed (duplicate)
Project:
Rules
Version:
6.x-1.x-dev
Component:
Provided Module Integrations
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2008 at 04:39 UTC
Updated:
26 May 2012 at 18:36 UTC
I have a case where I want to clear all terms from new content for a give vocabulary and assign a default term.
Currently I have to load all the terms, delete the ones I don't want from the content and assign the term I do want. This means my triggers action loads five terms, deletes four terms and assigns one term.
The patch adds a option to delete all vocabulary terms from the content. This means that trigger action now removes vocabulary, loads term, assigns term. Three steps are much simpler than ten.
Please go easy on me as this is my first attempt at adding code to rules and the code might needs some tweaking, clean up, etc.
Thoughts?
| Comment | File | Size | Author |
|---|---|---|---|
| rules_remove_vocabulary.diff | 1.65 KB | hawk259 |
Comments
Comment #1
fagothat makes sense. However make sure your patch is compliant to the drupal coding standards.
In-code (one line) comments are usually written with //
also have a look at your indention.
Why does the action provide a new vocabulary, shouldn't it require one as argument?!
then pleases have a look at this related issue: http://drupal.org/node/350831
Best build upon it and reuse the data type there.
Comment #2
hawk259 commentedIt seems $node->taxonomy bounces around with the format:
http://drupal.org/node/379564
I will follow up with a new patch once I work out the details of the above bug.
Comment #3
mitchell commentedDuplicate of #456328: Taxonomy actions: Add/Delete term.
Comment #4
mitchell commentedUpdated component.