xAPI-Spec icon indicating copy to clipboard operation
xAPI-Spec copied to clipboard

Question: Do time/sequence filters missing a target reference still return the source when it matches?

Open ryasmi opened this issue 7 years ago • 5 comments

Hey guys, just wanted to check my assumptions around retrieving statement references.

Spec Commit Hash 7a801f0

Question Is A returned when the following is true?

  • A, B, and C are statements.
  • A targets B.
  • B targets C.
  • Non time/sequence filters match C.
  • Time/sequence filters match A and C.

Relevant part of the spec

For filter parameters which are not time or sequence based (that is, other than "since", "until", or "limit"), Statements which target another Statement (by using a StatementRef as the Object of the Statement) will meet the filter condition if the targeted Statement meets the filter condition.

The time and sequence based parameters MUST still be applied to the Statement making the StatementRef in this manner. This rule applies recursively, so that "Statement a" is a match when a targets b which targets c and the filter conditions described above match for "Statement c".

ryasmi avatar May 03 '17 14:05 ryasmi

I really couldn't think of a better title for this issue, sorry.

ryasmi avatar May 03 '17 14:05 ryasmi

"This rule" is a little ambiguous, but earlier versions of the spec did not have that paragraph break and I'm confident that it refers to the targeting process, not the time and sequencing exception. The way I understand this is that, first the targeting rules are applied recursively and then the time and sequence filter is applied.

So my answer is yes, statement A should be returned.

garemoko avatar May 03 '17 15:05 garemoko

Brilliant, thanks @garemoko, this is exactly how I understood it. Perhaps it should be re-ordered slightly like this:

For filter parameters which are not time or sequence based (that is, other than "since", "until", or "limit"), Statements which target another Statement (by using a StatementRef as the Object of the Statement) will meet the filter condition if the targeted Statement meets the filter condition.

This rule applies recursively, so that "Statement a" is a match when a targets b which targets c and the filter conditions described above match for "Statement c".

The time and sequence based parameters MUST still be applied to the Statement making the StatementRef.

ryasmi avatar May 03 '17 15:05 ryasmi

@ryansmith94 yes, something like that sounds sensible. Please can i get you to re-open the issue as a reminder for somebody to make that change?

garemoko avatar May 03 '17 16:05 garemoko

Okay, yeah no worries.

ryasmi avatar May 03 '17 16:05 ryasmi