Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Catmandus less_than and greater_than conditionals #650

Open
TobiasNx opened this issue Dec 10, 2024 · 1 comment · May be fixed by #652
Open

Introduce Catmandus less_than and greater_than conditionals #650

TobiasNx opened this issue Dec 10, 2024 · 1 comment · May be fixed by #652

Comments

@TobiasNx
Copy link
Contributor

TobiasNx commented Dec 10, 2024

Introduce greater_than and less_than conditionals from Catmandu.
Requested by TU D for comparing numbers and years. This seems to be a good feature and already supported by catmandu.

from Catmandu:

# greater_than(X,Y) is true when X > Y
if greater_than('year','2018')
 add_field('my.funny.title','true')
end
# greater_than on arrays checks if all values are X > Y
if greater_than('years.*','2018')
  add_field('my.funny.title','true')
end

and

# less_than(X,Y) is true when X < Y
if less_than('year','2018')
 add_field('my.funny.title','true')
end
# less_than on arrays checks if all values are X < Y
if less_than('years.*','2018')
  add_field('my.funny.title','true')
end
@blackwinter blackwinter transferred this issue from metafacture/metafacture-fix Jan 27, 2025
@blackwinter blackwinter added this to the Release 7.0.0 milestone Jan 27, 2025
@blackwinter blackwinter linked a pull request Jan 28, 2025 that will close this issue
@blackwinter
Copy link
Member

Functional review: @TobiasNx
Code review: @fsteeg

@blackwinter blackwinter assigned TobiasNx and unassigned blackwinter Jan 28, 2025
@blackwinter blackwinter moved this from Ready to Review in Metafacture Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Review
Development

Successfully merging a pull request may close this issue.

2 participants