Rules condition "Flag threshold" should be ported to 8.x...

Issue fork flag-2540038

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

djevans’s picture

Here's my first attempt.

The class \Drupal\flag\Plugin\Derivative\FlagThresholdDeriver generates plugin derivatives for each flag type.

djevans’s picture

Assigned: Unassigned » djevans
djevans’s picture

Status: Active » Needs review
socketwench’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

I admit, I don't know much about Rules programming at all. How would we go about adding tests for this?

TR’s picture

@djevans: Are you still working on this? It's still assigned to you, as are a number of other issues listed in #2424465: [Meta] Implement Rules 8.x Support.

Core Rules has PHPUnit tests for the conditions that are defined as part of core Rules. These tests can be used as examples for tests of Flag conditions.

TR’s picture

Assigned: djevans » Unassigned

I guess djevans is not working on this anymore.

holybiber made their first commit to this issue’s fork.

TR’s picture

@holybiber: What's that supposed to be?

holybiber’s picture

@TR I just created the issue fork to try out drupalpod, didn't write any code. I thought this isn't visible to anyone until I actually create a commit, sorry.
I have intentions to work on this though, using the new ECA module.

TR’s picture

@holybiber: The holdup is that the maintainers of Flag haven't committed any of the patches for Rules support - it's been 6 years for this issue alone. You really think that starting a new module to do the same thing as Rules will be a solution to your needs? How about contributing to support all the work the community has done over the past 6 years to try to port the Rules support in the Flag module from D7 to D8/D9? Frankly, this all should have been done 6 years ago. If you think it will be faster to start from scratch, you're delusional. All you would be doing is diluting the work that's already been done and making it HARDER to reach the goal.

holybiber’s picture

@TR: I'm not the one doing the ECA module, I just heard about it some weeks ago and on the DrupalCon Europe I had the chance to talk to those who are developing it. There is a whole group behind it, making good progress. They talked also to those who are/were trying to port the Rules module to D8 - it's not really looking like this will happen as far as I've heard.
So I'm just here as someone who needs the threshold functionality, evaluating on what's a good and future-proof way to do so and becoming more convinced that implementing it with the new ECA module is a good idea and wouldn't require much effort. I don't want to frustrate anyone else, sorry if I did.