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

Đang mở
#310 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện điều kiện Rule được hiển thị với hai phép so sánh Fact và theo dõi cách kết quả Condition được tạo thành. Thay đổi được hoàn tất khi kết quả hiển thị các giá trị đã được phân giải cho cả Fact bên trái và Fact bên phải, với độ bao phủ cho trường hợp so sánh này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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,
}
Ngôn ngữ chính
JavaScript
Star
3.1k
Fork
507
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CacheControl/json-rules-engine

Tất cả issue của CacheControl/json-rules-engine

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.