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

vlan filter: comparing date to actual time #8066

Open
chri2 opened this issue Apr 4, 2024 · 0 comments · May be fixed by #8067
Open

vlan filter: comparing date to actual time #8066

chri2 opened this issue Apr 4, 2024 · 0 comments · May be fixed by #8067

Comments

@chri2
Copy link
Contributor

chri2 commented Apr 4, 2024

Describe the bug
Comparision to actual time doesn't work in

To Reproduce
Steps to reproduce the behavior:

  1. in Advanced Access Configuration / Filter Engines / VLAN Filters create a new filter
  2. add a value to the condition
  3. select a field to compare containing a date like e.g. node_info.regdate
  4. select as comparision 'date is before' or 'date is after'
  5. the empty field on the right side is marked with 'Value required' ¹⁾
  6. put 'now' into that field to compare to the actual time at the moment of evaluation
  7. fill out the rest and save

When the rule is evaluated this will lead to the error Error parsing time at /usr/local/pf/lib_perl/lib/perl5/x86_64-linux-gnu-thread-multi/Time/Piece.pm line 598.

¹⁾ This code in date_before.pm and in date_after.pm seems to be ment to use the actual date if the field marked with 'Value required' unfilled which the web gui doesn't allow and which leads to an error if edited in vlan_filters.conf .

Screenshots
2024-04-04_20-03-38-158398957

Expected behavior
Have a clear and self-explaining way to compare a date/time field to the actual time of evaluation.

Desktop (please complete the following information):

  • OS: Debian
  • Browser Firefox
  • Version Packetfence 13.1
@chri2 chri2 added the Type: Bug label Apr 4, 2024
@chri2 chri2 linked a pull request Apr 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant