Closed rbw closed 3 years ago
query = select( Incident.number.starts_with("INC123") & Incident.priority.less_than(5) | Incident.impact.less_than(3) ^ Incident.priority.greater_than(1) )
Gets serialized into numberSTARTSWITHINC123^priority<5^ORimpact<3, i.e. the last logical operator (NQ / bitwise XOR) and Condition is omitted. The same behavior is observed when replacing the bitwise XOR with bitwise AND.
numberSTARTSWITHINC123^priority<5^ORimpact<3
The bitwise OR however, works in this scenario:
query = select( Incident.number.starts_with("INC123") & Incident.priority.less_than(5) | Incident.impact.less_than(3) | Incident.priority.greater_than(1) )
Result: numberSTARTSWITHINC123^priority<5^ORimpact<3^ORpriority>1
numberSTARTSWITHINC123^priority<5^ORimpact<3^ORpriority>1
There is most likely something broken in the chain creation mechanism of Condition.
This needs to be fixed and the query system properly tested.
Fixed #94
Gets serialized into
numberSTARTSWITHINC123^priority<5^ORimpact<3
, i.e. the last logical operator (NQ / bitwise XOR) and Condition is omitted. The same behavior is observed when replacing the bitwise XOR with bitwise AND.The bitwise OR however, works in this scenario:
Result:
numberSTARTSWITHINC123^priority<5^ORimpact<3^ORpriority>1
There is most likely something broken in the chain creation mechanism of Condition.
This needs to be fixed and the query system properly tested.