Hi,

I want nodes to be unpublished at user's choice : 1 week, 2 weeks and 1 month (dropdown menu; text). I have managed to make an «if» (condition) in the process : if user selects value "2 weeks" than unpublish after 15 days. And it seems to work...

I have 2 questions :

1) do I have to make 3 different rules, one for each choice given to the user, or is it better (?) to have everything in one rule? If so, how can that be programmed into one rule?

2) I'm trying to send an email once, when node is unpublished, but I'm missing something. I have to compare data (modified/unmodified), but it did not work.

Thanks for your help! And a great 2016!

My rule if it can help without the email (export):

{ "rules_depublier_annonce" : {
    "LABEL" : "Unpublish_Ad",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "rules_scheduler" ],
    "ON" : { "node_insert--board" : { "bundle" : "board" } },
    "IF" : [
      { "data_is" : { "data" : [ "node:field-time-limit" ], "value" : "2 weeks" } }
    ],
    "DO" : [
      { "schedule" : {
          "component" : "rules_unpublish_bab",
          "date" : "+15 days",
          "identifier" : "[node:nid]",
          "param_unpublish_board" : [ "node" ]
        }
      },
      { "mail" : {
          "to" : "[node:author:mail]",
          "subject" : "expired an",
          "message" : "Your node has expired",
          "language" : [ "" ]
        }
      }
    ]
  }
}