CacheControl / CacheControl/json-rules-engine

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

オープン
#310 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
3.1k
フォーク
507
PR マージ指標
30日以内にマージされた PR はありません

説明

If I have a Rule condition such as:

```js
{
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:
```js
{
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:
```js
{
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,
}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。