eiffel-community / eiffel-intelligence

Eiffel Intelligence is a real time data aggregation and analysis solution for Eiffel events.
Apache License 2.0
11 stars 72 forks source link

fix by replacing id with _id #444

Closed saif-ericsson closed 4 years ago

saif-ericsson commented 4 years ago

Applicable Issues

Closes https://github.com/eiffel-community/eiffel-intelligence/issues/441

This is because Eiffel Intelligence doesn't find the resulting aggregation from the database. The key to search for should be "_id" not "id" - since we can't expect all and every custom rule set to put an "id" in the root of the aggregation.

Description of the Change

Alternate Designs

Benefits

Possible Drawbacks

Sign-off

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

Signed-off-by:

Christoffer-Cortes commented 4 years ago

A test could be to use a custom rule that doesn't extract any information from the start event so that just the general aggregation information is in the object. Then the test aggregation should fetch the object using the start event id. That should be successful with this fix.

e-pettersson-ericsson commented 4 years ago

SAIF: If there is one, need to be improved

Just to be clear then: have you tested this functionality locally/manually? Since I don't see any tests affected in this PR that is why I'm asking, to make sure this change doesn't break anything unforeseen.

saif-ericsson commented 4 years ago

A test could be to use a custom rule that doesn't extract any information from the start event so that just the general aggregation information is in the object. Then the test aggregation should fetch the object using the start event id. That should be successful with this fix.

I have created a story for for the two untested methods that will cover this comment as well.