Currentlly, when you search on Relationships in Advanced Search - all matching relationships are returned regardless of whether they are active or not. We need to allow folks to filter on active / inactive relationships.
1. Add radio buttons to Relationships search block:
Label = Relationship Status
Values = [ ] Active [ ] Inactive [ ] All
By default, Active is checked.
2. Modify relationship search query segment to filter results using the same logic as used on contact relationship tab:
- Active relationships = civicrm_relationship.is_active = 1 AND ( end_date is NULL OR end_date >= today )
- Inactive relationships = civicrm_relationship.is_active = 0 OR end_date < today