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

Right side of Rule condition Fact comparison does not appear in Condition result #310

Open
robross0606 opened this issue Aug 9, 2022 · 0 comments
Milestone

Comments

@robross0606
Copy link

robross0606 commented Aug 9, 2022

If I have a Rule condition such as:

  {
    fact: 'related-study-design',
    params,
    path: '$.id',
    operator: 'equal',
    value: {
      fact: "active-study-design",
      params,
      path: '$.id'
    }
  }

Where I'm comparing the values of two Facts, the factResult value does not appear to show the actual values of both Facts in the Condition results:

{
  fact: "related-study-design",
  params: {
    id: "study-designs-EFKeEO9bFQrWCr7Nhr5u3/RmPP1lqIkrkPMa5D_KRw6",
  },
  path: "$.id",
  operator: "equal",
  value: {
    fact: "active-study-design",
    params: {
      id: "study-designs-EFKeEO9bFQrWCr7Nhr5u3/RmPP1lqIkrkPMa5D_KRw6",
    },
    path: "$.id",
  },
  factResult: "study-designs-EFKeEO9bFQrWCr7Nhr5u3/RmPP1lqIkrkPMa5D_KRw6",
  result: false,
}

As you can see, the value of "active-study-design" Fact is not available in the results. Is there any way to get both sides of this comparison in the condition results? I would have expected another factResult under value like this:

{
  fact: "related-study-design",
  params: {
    id: "study-designs-EFKeEO9bFQrWCr7Nhr5u3/RmPP1lqIkrkPMa5D_KRw6",
  },
  path: "$.id",
  operator: "equal",
  value: {
    fact: "active-study-design",
    params: {
      id: "study-designs-EFKeEO9bFQrWCr7Nhr5u3/RmPP1lqIkrkPMa5D_KRw6",
    },
    path: "$.id",
    factResult: "study-designs-EFKeEO9bFQrWCr7Nhr5u3/n4Q2kVkVbGVzTig9ZTF0f",
  },
  factResult: "study-designs-EFKeEO9bFQrWCr7Nhr5u3/RmPP1lqIkrkPMa5D_KRw6",
  result: false,
}
@robross0606 robross0606 changed the title Fact as value does not appear correctly in Rule condition result Right side of Rule condition Fact comparison does not appear in Condition result Aug 9, 2022
@chris-pardy chris-pardy added this to the version 7 milestone Aug 25, 2023
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

No branches or pull requests

2 participants