Postponed (maintainer needs more info)
Project:
Workflow-ng
Version:
5.x-2.1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Jul 2008 at 20:50 UTC
Updated:
24 Jul 2008 at 11:17 UTC
Comments
Comment #1
amitaibuCreate a rule invoked on 'content has been updated' and in your condition check that the state has changed from demoted to promoted.
Comment #2
chazz commentedThanks, but I can't find that condition to change from demoted to promoted. That option is only available in Action, not condition. I need condition as promoted/demoted and action as gained/losed points.
In Conditions menu for Node I can select only CONTENT HAS TYPE. DO I need additional module to enable demoted/promoted conditions ?
Comment #3
amitaibuYou can use 'Textual comparison' and check the promoted token (i.e.
[node:promote])Comment #4
chazz commentedThank you for your replay again,
Sorry but I can't setup this to work as it should. Please, could you explain me step by step how to setup that workflow rules, conditions and action ? When I am making textual comparision I can put something to Two texts to compare: In the first one [node:promote] but what about the other one ?
Also why I can't see condition to demote/promote as you advised to do before ?
Thank you.
Comment #5
amitaibuThere is no condition to promote, there is the token replacement as I suggested in #3.
In the first text enter to [unchanged_node:promote] and in the second the [updated_node:promote] (dig a bit in the token replacement list).
Comment #6
chazz commentedOk I have done it, but now point's are not added at all. Without that tokens, points are gained if node is promoted and demoted.
I don't know what to do.. ehhh.. sorry for that I need more informations, please.
This is exported code for promoted rule:
Thank you.
Comment #7
amitaibuYou aren't looking in pattern replacement, so it doesn't work for you.
[node:promote] should be in one text and [node_unchanged:promote] in the other.
I don't know user points enough to help you with that.
Comment #8
chazz commentedDoesn't work.. nothing is happened.
I have found that token before [node:promote] Whether the node is promoted to the front page. (yes/no)
Now my code looks like this:
Edit:
I also tried: [node:promote] in one text and [node_unchanged:promote] in the other... still doesn't work
Edit2: HOLD ON I THINK I HAVE FOUND A SOLUTION... brb :)
Comment #9
chazz commentedOk I have ticked negate and evaluate for promoted and evaluate only for demoted and it's working fine now :)
Thank you for your help!
Comment #10
amitaibuCool! Maybe now that you now how 'painful' it is to be a newbie, you can add some documentation about your workflow?
Comment #11
chazz commentedI will, it will be my first one :)
Comment #12
chazz commentedOk I have found another problem. When user want to edit node, and node is not promoted he will gain points again. If node is promoted and user want to edit own node, he's going to lost the points so I decided to remove demote event for a while...
Edit:
Ok I have left only event to promote node with conditions for Textual comparison and action for Grant points to a user.
Now, when node is not yet promoted and I would like to EDIT node, I will gain points (because of update). -
After node is promoted I will gain points (as it should be) +
And now, if I like to edit promoted node I will NOT gain any more points (as it should be) +
And now, if node is demoted I am not loosing points (as it should be, because I deleted demote event as I said before) +
And now... we can do a circle :P Back to point 1. After node will be edited I will gain again points.
So how I can stop earning points from editing not promoted nodes ?