CacheControl / CacheControl/json-rules-engine

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

Aperta
#310 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
3.1k
Fork
507
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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,
}
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.