hey

we have node/user/comment is flagged (with x flag)
and we have node/user/comment has flag count (with x flag)
need a flag being flagged (with x flag) condition

that possible?

at the moment i am attempting to use PHP code for the condition:

if $flag == "node_report" then {
  return TRUE;
} else {
  return FALSE;
}

the rule is inside a ruleset, which has node+flag argument.

but it's a bit raw... i don't like it much

Comments

lpalgarvio’s picture

typos in it...

if ( $flag == "node_report" ) {
  return TRUE;
} else {
  return FALSE;
}

but it didn't worked.

resolved by using Rules » Textual comparison: [flag:flag-name] with node_report

a flag being flagged condition (requiring $flag arg) would still be optimal though

quicksketch’s picture

Category: feature » support

I don't provide help on custom PHP code, especially within Rules (since I don't use that module).

lpalgarvio’s picture

Category: support » feature

in the top of the thread i mentioned a feature request: add a flag being flagged (with x flag) condition, for rules integration

similarly to
- node/user/comment is flagged (with x flag)
- node/user/comment has flag count (with x flag)

the code i provided is just a workaround that didn't worked. the Rules » Textual comparison: [flag:flag-name] with node_report did though. but it's raw.

fago’s picture

Status: Active » Closed (won't fix)

There is a "flag is flagged" event - a condition doesn't make sense for that?

lpalgarvio’s picture

if i'm not mistaken (last time i checked), the condition won't allow checking with the flag was flagged with a particular flag. just got flagged. needs further investigation