Control expression query evaluator
What does this MR do and why?
Control expression query evaluator
This commit adds a query evaluator to parse and evaluate control expression
EE: true Changelog: added
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Open rails console and enter:
::ComplianceManagement::ComplianceRequirements::ControlExpressionEvaluator.new("{\"operator\":\"=\",\"field\":\"project_name\",\"value\":\"name\"}", Project.last).execute
- Should return true if input name matches project's name, otherwise returns false
- You can also check trying checking different fields and values
Related to #507239
Edited by Harsimar Sandhu