Skip to content

Add datetime_rule_variable/DateTimeType.#83

Open
trevoriancox wants to merge 1 commit into
venmo:masterfrom
trevoriancox:datetimetype
Open

Add datetime_rule_variable/DateTimeType.#83
trevoriancox wants to merge 1 commit into
venmo:masterfrom
trevoriancox:datetimetype

Conversation

@trevoriancox

Copy link
Copy Markdown

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.

1 participant