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

Add datetime_rule_variable/DateTimeType. #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trevoriancox
Copy link

A useful addition to the conditions is a date/time field. It appears to me that to add additional variables, you have to modify operators.py in this library, as utils.export_rule_data inspects this file. If additional variables can't be added without modifying the library, it would be helpful to have a more complete set of variable types.

If there is interest, I could add the test cases.

This implementation handles only naive datetimes, as would be provided by HTML5 datetime-local inputs. For code that expects time zone information, I noted that has been added to business_rules in https://github.com/TencentBlueKing/bk-itsm/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant