Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Analogous to the "If less than 1 million, divide by 1 million" option, we should have the same for billions and trillions.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2474113-1--less_than_billion_trillion.patch | 3.98 KB | drunken monkey |
Comments
Comment #1
drunken monkeySimple patch attached (copy/paste, search/replace).
Comment #2
herd45 CreditAttribution: herd45 commentedI've tested and this works as expected
Comment #3
mstef CreditAttribution: mstef commentedI'm a bit confused about the fact that the number 1 is under a million, under a billion, and under a trillion. How does this account for that?
Comment #4
drunken monkeyThe same as is currently done for the "If greater than …" options: only the most specific one will match, then the
break 2;
will prevent all other checks.Of course, having both, e.g., "Greater than 1 million" and "Less than 1 billion" active will result in weird results (i.e., the latter only triggering if the value is also less than 1 million) – but why would a user configure that?
Generally, I see these options being used to have the same scale for all numbers, not only if they should be divided by a million, but also if the scale is a billion or a trillion. I.e., the use case is having just "Greater than or equal to X" and "Less than X" enabled and the others disabled.
Or did I misunderstand the question?
Comment #5
mstef CreditAttribution: mstef commentedI added you as a maintainer. Feel free to commit this.
Comment #7
drunken monkeyOK, thanks!
Committed.