Update overlaps to ignore end date#14
Conversation
|
Two comments: (1) The QDM User Group is scheduled to discuss this issue on 8/20/2014. I expect they will confirm that this is the behavior they want, but we should wait to see before merging. (2) This particular implementation is logically incorrect. Here is a simple test case that should evaluate to I believe that a proper implementation probably needs to have different logic depending on whether A's end date is null or B's end date is null. |
|
Thanks for pointing that out. I added a test to cover that case, and adjusted the logic. The only question I had, and this is probably a philisophical one to be decided by the QDM working group, is what to do if both cases have an undefined end? From the standpoint of a timeline, these would always overlap, so I have that set to true, but I'm not sure if that's the desired behavior. Either way, that would be a simple change. |
|
I think that perhaps there are still some issues... I'll go through them one at a time: Based on the code comment (and your github comment), I think you mean to check that both are null. The code should probably be: In this case we now know that But then... I think we can simplify it further, because we're really just saying that the source event can't start after the other event: This would capture an overlap on the left side of The rest looks good! Let me know if you have any questions or if I got something wrong... |
|
Thanks Chris - the first issue was actually taken care of with one of the later commits (345bc7b). I agree on the other points, and will make those changes (and add associated tests). Thank you. |
Story
https://www.pivotaltracker.com/s/projects/912050/stories/77112746
Notes
If both object and other have non-null end dates, behavior is as previously defined. Otherwise, only look for a start before start.