Closed (fixed)
Project:
Flag
Version:
7.x-3.x-dev
Component:
Rules integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 May 2013 at 16:31 UTC
Updated:
30 Aug 2013 at 06:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
joachim commentedThe Rules integration is currently unmaintained, so this issue is entirely dependent on users of Rules providing a patch.
Comment #2
shabana.navas commented> Also it would be nice to see an option to trim the newest flag in order to prevent new flags once a limit is reached.
The attached patch takes care of this. As for trimming flags with the greatest weight, ASFAIK, the flag_weights module does not have a stable version that integrates with the newest version of the flag module. Consequently, I think that can wait until the maintainers for that module releases a stable version.
Comment #3
joachim commentedThanks for working on this.
Here's a quick eyeball review:
If we're adding to an API function on our stable branch, we should make this param optional and default to the existing behaviour.
Remember to trim whitespace :) Your text editor should have a command to do this automatically.
Also, wrap comments to 80 chars and finish sentences with a .
How is the addition of a param going to affect existing rules? (Could users of Rules try this out please?)
Is there a way to declare this as optional?
Comment #4
shabana.navas commentedJoachim, will update with the edits.
>Is there a way to declare this as optional?
Actually, this is an optional field. It shows up as a checkbox and is unchecked by default. So, it won't affect the existing rules until the checkbox is checked. And once it is checked, it will just trim the newest flags.
So, basically, it behaves like an option field and defaults to the existing behavior of rules.
Comment #5
shabana.navas commentedThe updated patch is attached. Let me know if I have missed anything. Thanks.
Comment #6
shabana.navas commentedCommitted to 7.x-3.x branch.