Rules: Data comparison between saved and unchanged node doesn't work with radio buttons I successful used the data comparison on rules condition between saved and unchanged node for a date field.

I tried the same with a radio buttons list with two options, but the rule doesn't trigger if I change the value after saving the node.

What's wrong?

Here the rule: http://kopy.io/6GfFi  and here is an instream copy of it:

{ "rules_last_day_of_work" : {
"LABEL" : "Last Day of Work",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules", "interval", "rules_conditional" ],
"ON" : { "node_update--job_contract" : { "bundle" : "job_contract" } },
"IF" : [
  { "NOT data_is" : {
      "data" : [ "node-unchanged:field-date-of-last-day-of-work" ],
      "value" : [ "node:field-date-of-last-day-of-work" ]
    }
  },
  { "OR" : [] },
  { "NOT data_is" : {
      "data" : [ "node:field-resignation-layoff" ],
      "value" : [ "node-unchanged:field-resignation-layoff" ]
    }
  }
],
"DO" : [
  { "drupal_message" : { "message" : "test" } },
  { "data_calc" : {
      "USING" : {
        "input_1" : [ "node:field-days-of-notification" ],
        "op" : "*",
        "input_2" : "-1"
      },
      "PROVIDE" : { "result" : { "days_of_notification_negative_sign" : "Days of notification with negative_sign" } }
    }
  },
  { "interval_apply" : {
      "USING" : {
        "interval" : [ "days_of_notification_negative_sign" ],
        "period" : "day",
        "date" : [ "node:field-date-of-last-day-of-work" ]
      },
      "PROVIDE" : { "date" : { "notification_date" : "Notification Date" } }
    }
  },
  { "CONDITIONAL" : [
      {
        "IF" : { "text_matches" : {
            "text" : [ "node:field-resignation-layoff" ],
            "match" : "L",
            "operation" : "starts"
          }
        },
        "DO" : [
          { "data_set" : {
              "data" : [ "node:field-layoff-date" ],
              "value" : [ "notification-date" ]
            }
          },
          { "data_set" : { "data" : [ "node:field-resignation-date" ] } }
        ]
      },
      { "ELSE" : [
          { "data_set" : {
              "data" : [ "node:field-resignation-date" ],
              "value" : [ "notification-date" ]
            }
          },
          { "data_set" : { "data" : [ "node:field-layoff-date" ] } }
        ]
      }
    ]
  },
  { "redirect" : { "url" : "[node:url]" } }
]
}   }


THE ANSWER IS:
this is the way to put two condition in "OR"
 

and NOT this one:
1st attempt (do some debugging ...)

You clearly have a combination of Rules Conditions and/or Actions which don't seem to react as you expect/want them to do. If I was to get this to work, the first thing I'd do is Rules debugging. Rules is great, but sometimes also tough to debug if things don't work as you'd expect.

There are some typical facilities to do such debugging, but my Keep-It-Super-Simple technique I often use is my BINGO-trick (if you want, you could consider/call it "adding breakpoints to a rule you want to debug"). A sample of such rule can be found in my answer to "Which Rules condition can be used to email a user when an admin updates their profile?". Obviously, if you have more then 1 Rules Action (you seem to have (about) 4, following the "Display message test"), you may want to  make it like Bingo1, Bingo2, Bingo3, etc. Depending on the order they are shown, you also know the order of execution. Stupid, but simple and efficient (I think). Here is an edited version of your rule containing those BingoX-messages (try to import it in your site, note I gave it another machine name):

{ "rules_cessazione_with_breakpoints" : {
    "LABEL" : "Cessazione with breakpoints",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "interval", "rules_conditional" ],
    "ON" : { "node_update--rapporto_di_lavoro" : { "bundle" : "rapporto_di_lavoro" } },
    "IF" : [
      { "NOT data_is" : {
          "data" : [ "node-unchanged:field-data-cessazione" ],
          "value" : [ "node:field-data-cessazione" ]
        }
      },
      { "OR" : [] },
      { "NOT data_is" : {
          "data" : [ "node:field-dimissioni-licenziamento" ],
          "value" : [ "node-unchanged:field-dimissioni-licenziamento" ]
        }
      }
    ],
    "DO" : [
      { "drupal_message" : { "message" : "Bingo1" } },
      { "data_calc" : {
          "USING" : {
            "input_1" : [ "node:field-giorni-di-preavviso" ],
            "op" : "*",
            "input_2" : "-1"
          },
          "PROVIDE" : { "result" : { "giorni_neg" : "Giorni neg" } }
        }
      },
      { "drupal_message" : { "message" : "Bingo2" } },
      { "interval_apply" : {
          "USING" : {
            "interval" : [ "giorni-neg" ],
            "period" : "day",
            "date" : [ "node:field-data-cessazione" ]
          },
          "PROVIDE" : { "date" : { "data_preavviso" : "Data Preavviso" } }
        }
      },
      { "drupal_message" : { "message" : "Bingo2" } },
      { "CONDITIONAL" : [
          {
            "IF" : { "text_matches" : {
                "text" : [ "node:field-dimissioni-licenziamento" ],
                "match" : "L",
                "operation" : "starts"
              }
            },
            "DO" : [
              { "drupal_message" : { "message" : "Bingo3a" } },
              { "data_set" : {
                  "data" : [ "node:field-data-licenziamento" ],
                  "value" : [ "data-preavviso" ]
                }
              },
              { "drupal_message" : { "message" : "Bingo3b" } },
              { "data_set" : { "data" : [ "node:field-data-dimissioni" ] } },
              { "drupal_message" : { "message" : "Bingo3c" } }
            ]
          },
          { "ELSE" : [
              { "drupal_message" : { "message" : "Bingo4a" } },
              { "data_set" : {
                  "data" : [ "node:field-data-dimissioni" ],
                  "value" : [ "data-preavviso" ]
                }
              },
              { "drupal_message" : { "message" : "Bingo4b" } },
              { "data_set" : { "data" : [ "node:field-data-licenziamento" ] } },
              { "drupal_message" : { "message" : "Bingo4c" } }
            ]
          }
        ]
      },
      { "drupal_message" : { "message" : "Bingo5" } },
      { "redirect" : { "url" : "[node:url]" } },
      { "drupal_message" : { "message" : "Bingo6" } }
    ]
  }
}


I'd be interesting to hear which of those "BingoX" messages will get shown while debugging your rule ... Based on that you should come closer to finding the real reason for your rule which doesn't seem to do what you expect/want.

For more suggestions about Rules debugging, and more advanced facilities, refer to "How can I display the value of a variable inside a condition?"

Note: for those who think "this is not an answer", here is my reply to that already: do you know the story about giving somebody a fish, versus giving a fishline (or whatever that is called)?

2nd attempt (why no "entity has field"?)

About your "but the rule doesn't trigger". It may mean that you NOT (repeat: NOT) get that "test" message (as in your very first rules action). If that's the case, I'd wonder (if I was debugging) what results you get if you (temporary) remove the first rules condition? And what if you (temporary) remove the 2nd rules condition?

Hang on: you don't seem to have the typical "entity has field" condition (as your very first Rules Condtion). Imagine Rules thinks all those field values are blank (because of the missing  "entity has field" ...), then neither condition is true (because of the NOT ...), so the rule works as implemented. Therefor, add such "entity has field" Rules Condition, 1 for each of the fields you are already doing those data comparisons. Then let us know the result (the bets are open ...).