By agentsubversion on
I searched around and didn't find an answer for this. Hopefully I'm not reposting.
I'm trying to find a way to change a nodes taxonomy term as an action in a workflow. Is there a simple snipplet that can be used to do this?
I'm sorry... I can't think of any more information to post about this question. I feel kind of bad posting such a short post.
Comments
Same need
Hello agent,
did you managed to get this to work?..i am actually looking for the same exact thing!
Any hint or help apreciated :)
I'm interested in this too.
I'm interested in this too. Combined with CCK, this would enable a magazine or newsletter publishing workflow. Categories instead of taxonomy would be fine, as I'm considering moving to that module.
Here is a bit I did
This is not changing the term but it is close to what you need I think. I created a quick custom action to add a taxonomy term to a node. It is just doing a simple DB insert into the term_node table. It also gives you a configuration screen to indicate which ID number you want to use. There is probably a better way to do this but it works me right now.
I put this code (along with a few other custom actions) into a module I creatively called customActions.module. You should be able to edit this to do other SIMPLE taxonomy changes by simply changing the db_query to swap out the term id (SQL UPDATE) or remove (SQL DELETE) with whatever logic you want.
Hope it helps someone.
Drupalize.Me, The best Drupal training, available all the time, anywhere!
THX!! i think i need this.. but i got a cuestion
Nice, i'm gonna test this.. but i got a little cuestion, this code work with actions and workflow 5.x.2 (D6 style actions) ?
and.. where i put this code ?
May the source be with you .....